Fix shared run map tile referrer policy
This commit is contained in:
+2
-1
@@ -93,7 +93,8 @@ def create_app(config=None):
|
||||
response.headers["X-Frame-Options"] = "DENY"
|
||||
response.headers["Referrer-Policy"] = "strict-origin-when-cross-origin"
|
||||
if request.path.startswith("/shared/runs/"):
|
||||
response.headers["Referrer-Policy"] = "no-referrer"
|
||||
# OSM tiles require a Referer; never include the share token in it.
|
||||
response.headers["Referrer-Policy"] = "strict-origin"
|
||||
response.headers["X-Robots-Tag"] = "noindex, nofollow"
|
||||
return response
|
||||
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@ def test_public_run_link_copy_view_revoke_and_recreate(app):
|
||||
assert b"/u/runner" not in page.data
|
||||
assert (url.removeprefix("http://localhost") + "/data").encode() in page.data
|
||||
assert page.headers["X-Robots-Tag"] == "noindex, nofollow"
|
||||
assert page.headers["Referrer-Policy"] == "no-referrer"
|
||||
assert page.headers["Referrer-Policy"] == "strict-origin"
|
||||
data = anonymous.get(url + "/data")
|
||||
assert data.status_code == 200
|
||||
assert data.json["segments"] == [[[-33, 151]]]
|
||||
|
||||
Reference in New Issue
Block a user