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

Cannot Update Content Security Policy #773

Open
jax-2220 opened this issue Jan 22, 2025 · 3 comments
Open

Cannot Update Content Security Policy #773

jax-2220 opened this issue Jan 22, 2025 · 3 comments

Comments

@jax-2220
Copy link

Hi,

I am currently trying to update the content security policy to not include unsafe-inline or unsafe-eval. I have included necessary domains in the CSP but it is not working as expected. Is there a standard process for updating CSP for lex-web-ui and can you give us some insight on how to remove unsafe-inline and unsafe-eval when running/deploying the application with webpack?

Thanks!

@atjohns
Copy link
Contributor

atjohns commented Jan 22, 2025

The CSP is located in the index.html page, you'll want to remove them from there directly. If you build/deploy from webpack after making those changes it should get pushed out to your implementation of the web ui.

@jax-2220
Copy link
Author

We have already updated the CSP successfully, but we are unable to load our application without unsafe-inline/unsafe-eval. Do you have any guidance on what needs to be included in our CSP if we need to remove unsafe-inline/unsafe-eval? We have already included our needed domain.

@atjohns
Copy link
Contributor

atjohns commented Jan 24, 2025

The VueJS requires the unsafe-eval to function (it appears the runtime version - vue.runtime.global.prod.min.js - is fully CSP compatible but I was never able to get that to work properly, we use the vue.global.prod.min.js).

Vuetify used to required unsafe-inline but it appears you can use a nonce now, I will look into doing that for the next release so we can remove unsafe-inline.

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

No branches or pull requests

2 participants