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

Content-Security-Policy header breaks Flask-Admin forms #56

Closed
ntarocco opened this issue Aug 7, 2017 · 0 comments · Fixed by #57
Closed

Content-Security-Policy header breaks Flask-Admin forms #56

ntarocco opened this issue Aug 7, 2017 · 0 comments · Fixed by #57
Assignees
Milestone

Comments

@ntarocco
Copy link
Contributor

ntarocco commented Aug 7, 2017

The Talisman extension in Invenio app module adds the security header
[X-]Content-Security-Policy:default-src 'self'

This breaks the Flask-Admin forms because the code has inline js/css.

There is an issues opened on Flask-Admin and a PR partially fixing the issue (pallets-eco/flask-admin#1135). For the time being, the easiest solution is to remove the header for Invenio admin views.

@ntarocco ntarocco self-assigned this Aug 7, 2017
@ntarocco ntarocco added this to the v1.0.0 milestone Aug 7, 2017
ntarocco added a commit that referenced this issue Aug 7, 2017
- override Talisman configuration @before_request to set CSP to None
- remove CSP response header
- fixes #56
ntarocco added a commit to ntarocco/invenio-admin that referenced this issue Aug 7, 2017
ntarocco added a commit to ntarocco/invenio-admin that referenced this issue Aug 8, 2017
ntarocco added a commit to ntarocco/invenio-admin that referenced this issue Aug 8, 2017
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 a pull request may close this issue.

3 participants