Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override X-Frame-Options specifically for the rack-elevation SVG view #943

Merged
merged 2 commits into from Sep 24, 2021

Conversation

glennmatthews
Copy link
Contributor

Fixes: #939

Instead of setting X_FRAME_OPTIONS = "SAMEORIGIN" globally, which Django complains about as a generalized security risk, change the global default back to the recommended setting of "DENY" and use a Django view decorator to specifically set "SAMEORIGIN" for the one view (rack-elevation SVG rendering) where it's needed.

@glennmatthews
Copy link
Contributor Author

Screenshots showing that for requests (such as the base Rack detail view) we are now defaulting to DENY (see the bottom right of each image):

image

but for the SVG rendering specifically we are using SAMEORIGIN:

image

@glennmatthews glennmatthews merged commit 5b0f6db into develop Sep 24, 2021
@glennmatthews glennmatthews deleted the gfm-issue-939 branch September 27, 2021 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rack elevation renderings not shown when X-Frame-Options is set to DENY
2 participants