mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Split out a separate endpoint to complete SSO registration (#9262)
There are going to be a couple of paths to get to the final step of SSO reg, and I want the URL in the browser to consistent. So, let's move the final step onto a separate path, which we redirect to.
This commit is contained in:
parent
a083aea396
commit
f78d07bf00
7 changed files with 145 additions and 26 deletions
|
@ -761,6 +761,13 @@ def set_clickjacking_protection_headers(request: Request):
|
|||
request.setHeader(b"Content-Security-Policy", b"frame-ancestors 'none';")
|
||||
|
||||
|
||||
def respond_with_redirect(request: Request, url: bytes) -> None:
|
||||
"""Write a 302 response to the request, if it is still alive."""
|
||||
logger.debug("Redirect to %s", url.decode("utf-8"))
|
||||
request.redirect(url)
|
||||
finish_request(request)
|
||||
|
||||
|
||||
def finish_request(request: Request):
|
||||
""" Finish writing the response to the request.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue