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

Please provide better examples for csp #21

Closed
dsingleton47 opened this issue May 22, 2018 · 5 comments
Closed

Please provide better examples for csp #21

dsingleton47 opened this issue May 22, 2018 · 5 comments

Comments

@dsingleton47
Copy link

Please provide better examples for CSP in the documentation, if I provide anything other than:
'self' => true I the result is an empty img-src value, this is true if I provide an array as well. for example using the example from paragonie/csp-builder with:

'self' => true,
'data' => true

my resulting policy only has self, data doesn't work at all. If I try to provide a domain, the same is true.

@JohanMa4
Copy link

Hi @bepsvpt, how are you man?, i have troubles by adding the data attribute on:
'font-src' => ['data' => true]
img-src' => ['data' => true]

The 'data' attribute not works!

Can you help me?

Thanks!

@JohanMa4
Copy link

Found the problem to allow 'data', if some one needs to allow 'data' on each attributes (font-src, img-src, style-src, etc), you can do something like this:

font-src => [ 'allow' => 'data:' ]
img-src => [ 'allow' => 'data:' ]

I hope this will be helpfull

@bepsvpt
Copy link
Owner

bepsvpt commented Jul 31, 2018

Hi @dsingleton47 and @JohanMa4,

I have updated the document. If you have any suggestion, I will deeply appreciate your feedback.

@bepsvpt bepsvpt closed this as completed in 3795984 Aug 5, 2018
@agenciatamandua
Copy link

agenciatamandua commented Dec 9, 2020

Please improve Documents, the CSP part is very bad at understanding.
Could you give better examples of how to use CSP?

@bepsvpt
Copy link
Owner

bepsvpt commented Dec 12, 2020

Hi @agenciatamandua,

If you can provide your requirements, I can include it in examples.

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

No branches or pull requests

4 participants