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 (content security policy) nonce support #35

Closed
GOG-Games-com opened this issue Dec 10, 2022 · 4 comments · Fixed by #47
Closed

CSP (content security policy) nonce support #35

GOG-Games-com opened this issue Dec 10, 2022 · 4 comments · Fixed by #47

Comments

@GOG-Games-com
Copy link

GOG-Games-com commented Dec 10, 2022

Hi, I am using spatie/laravel-csp to set CSP headers and nonce values are needed for script and style for my website. Is there a way to have support for this? Similar to this: livewire/livewire#650

The styles and scripts are blocked when loading the admin panel so nothing loads as it requires the JS to load.

Thank you.

@welcome
Copy link

welcome bot commented Dec 10, 2022

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication channels:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;
  • Showing off something you've made, asking for opinion on Backpack/Laravel matters - Reddit;

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

--
Justin Case
The Backpack Robot

@GOG-Games-com GOG-Games-com changed the title [Bug] CSP content security policy nonce support CSP content security policy nonce support Dec 10, 2022
@GOG-Games-com GOG-Games-com changed the title CSP content security policy nonce support CSP )content security policy) nonce support Dec 10, 2022
@GOG-Games-com GOG-Games-com changed the title CSP )content security policy) nonce support CSP (content security policy) nonce support Dec 10, 2022
@pxpm
Copy link
Contributor

pxpm commented Dec 12, 2022

Thanks for the suggestion @GOG-Games-com

I will mention this issue in PR Laravel-Backpack/CRUD#4815 where @promatik is re-working the assets module and I think we should take this into account from start.

I will be closing this issue so that we don't have conversations about the same subject on multiple places.

Thanks again for the suggestion, wish you the best 🎅

@promatik
Copy link
Contributor

Hey @GOG-Games-com!
We've already though about this 🙌 for the next version 😕

So, with the new @basset directive you'll be able to add all the attributes you need to the script/style tags.

We'll keep this one open, to be sure we fully support this feature, because right now (bassets dev branch) you can do it one by one, but we must make sure this will be a setting and will be rendered for all the assets 👌

(This is also a note for future us!)

@tabacitu tabacitu transferred this issue from Laravel-Backpack/CRUD Apr 29, 2023
@promatik
Copy link
Contributor

Fixed by #47.

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

Successfully merging a pull request may close this issue.

4 participants