def build_hsts_header(config):
    """Returns HSTS Header value."""
    value = 'max-age={0}'.format(config.max_age)
    if config.include_subdomains:
        value += '; includeSubDomains'
    if config.preload:
        value += '; preload'
    return value