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

Set X-Frame-Options setting on a per-view basis #405

Merged
merged 2 commits into from
Jan 12, 2021
Merged

Conversation

czlee
Copy link
Contributor

@czlee czlee commented Jun 20, 2020

Hello, I was wondering what you would think of setting X-Frame-Options on a per-view basis, rather than having users specify X_FRAME_OPTIONS for the entire site in the settings file? This would allow the site still to run with the default X-Frame-Options: DENY for general security, while letting the Summernote frames through.

I notice this has been suggested by @mimi89999 in #381 (comment), but I wasn't sure what the outcome of that was.

In our project we only use the text editors (we don't use file attachments), so I might not have caught every relevant spot—let me know if I missed something.

Thanks for your work on this package, it's been a godsend for us!

The views now override the middleware using the xframeoptions_sameorigin
decorator, as in 3c2bbb0.
@tienne-B
Copy link

Is there progress in reviewing this PR?

Base automatically changed from master to main January 12, 2021 10:33
@lqez lqez merged commit 3932cbf into lqez:main Jan 12, 2021
@lqez
Copy link
Owner

lqez commented Jan 12, 2021

Once upon a time, there was a patch for X-Frame-Options ...
Sorry for the delay, thanks a lot!

@quroom
Copy link

quroom commented Feb 10, 2021

It's awesome!
I was looking for this.
And almost ready to make PR!
I saved my time.
Thanks a lot @czlee

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.

4 participants