forked from mozilla/django-browserid
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mozilla#64: Add docs for CSP issues.
- Loading branch information
Michael Kelly
committed
Jun 7, 2012
1 parent
c5ff70f
commit 9c66c22
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Troubleshooting | ||
=============== | ||
|
||
CSP WARN: Directive "..." violated by https://browserid.org/include.js | ||
---------------------------------------------------------------------- | ||
|
||
This warning appears in the Error Console when your site uses | ||
`Content Security Policy`_ without making an exception for the browserid.org | ||
external JavaScript include. | ||
|
||
To fix this, include https://browserid.org in your script-src directive. If | ||
you're using the `django-csp`_ library, the following settings will work:: | ||
|
||
CSP_SCRIPT_SRC = ("'self'", 'https://browserid.org',) | ||
CSP_FRAME_SRC = ("'self'", 'https://browserid.org',) | ||
|
||
.. note:: The example above also includes the frame-src directive. There is an | ||
iframe used during BrowserID login, but some people report that login will | ||
work without the directive. In general, you should probably include it. | ||
|
||
.. _Content Security Policy: https://developer.mozilla.org/en/Security/CSP | ||
.. _django-csp: https://github.com/mozilla/django-csp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ to fork_ and contribute! | |
setup | ||
details/customization | ||
details/settings | ||
details/troubleshooting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters