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

CSP header image-src should be img-src #12

Closed
kmturley opened this issue Aug 4, 2017 · 1 comment
Closed

CSP header image-src should be img-src #12

kmturley opened this issue Aug 4, 2017 · 1 comment
Labels

Comments

@kmturley
Copy link
Contributor

kmturley commented Aug 4, 2017

In this example of your documentation image-src should actually be img-src:

csp = {
    'default-src': '\'self\'',
    'image-src': '*',
    'media-src': [
        'media1.com',
        'media2.com',
    ],
    'script-src': 'userscripts.example.com'
}

Also would be useful to show the way to pass in the settings e.g:

csp = {
    'default-src': '\'self\'',
    'img-src': '*',
    'media-src': [
        'media1.com',
        'media2.com',
    ],
    'script-src': 'userscripts.example.com'
}
talisman = Talisman(app, content_security_policy=csp)

I had to search the source to find how to pass it through :)

@theacodes
Copy link
Contributor

@kmturley would you be willing to submit a PR to fix that? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants