Spaces:
Paused
Paused
Referrer-Policy same-origin: an app's own POSTs keep their Origin
Browse files69 unmodified lines7071727374757669 unmodified linesif kept:response.headers.append("content-security-policy", "; ".join(kept))response.headers.append("content-security-policy", "frame-ancestors " + " ".join(FRAME_ANCESTORS))response.headers["referrer-policy"] = "no-referrer"return response69 unmodified lines70717273747576777869 unmodified linesif kept:response.headers.append("content-security-policy", "; ".join(kept))response.headers.append("content-security-policy", "frame-ancestors " + " ".join(FRAME_ANCESTORS))# The app's own requests keep their Origin (no-referrer made a form POST's Origin "null", which# CSRF checks refuse); nothing of the preview's URLs reaches other sites.response.headers["referrer-policy"] = "same-origin"return response
app.py+3-1