'Endpoint subdomains can redirect through to update HSTS grants.'

@csrf_exempt
@validate(dest=VDestination(default='/'))
def _modify_hsts_grant(self, dest):

    from r2.lib.base import abort
    require_https()
    if (request.host != g.domain):
        abort(ForbiddenError(errors.WRONG_DOMAIN))
    dest_parsed = UrlParser(dest)
    dest_parsed.scheme = 'https'
    dest = dest_parsed.unparse()
    return self.redirect(dest, code=307)
