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

Problem with Content Security Policy on Sidekiq WEB #43

Open
durcak opened this issue Jan 25, 2024 · 2 comments · May be fixed by #44
Open

Problem with Content Security Policy on Sidekiq WEB #43

durcak opened this issue Jan 25, 2024 · 2 comments · May be fixed by #44

Comments

@durcak
Copy link

durcak commented Jan 25, 2024

Gem version: 3.0.3
sidekiq version: 7.2.1
rails version: 7.1.3

Hi, I have a problem on sidekiq statuses page with not working statuses and per page filters and browser throws console errors:

Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.

Refused to execute a script for an inline event handler because 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.

All works fine in past years, I do not know if its stop working after rails update or other gems updates or new browsers CSP rescrictions.

Thanks for help.

@grdmnt
Copy link

grdmnt commented Jan 30, 2024

Might be due to sidekiq 7.2.0's update re: unsafe-inline scripts.

sidekiq/sidekiq#6074

@grdmnt
Copy link

grdmnt commented Jan 31, 2024

I took a look at the code related to this. There's a script tag inside statuses.erb that we need to remove and move to its own file. However, attempting to do this, I'm not entirely sure how we can add additional javascript files into Sidekiq's static routes.

@grdmnt grdmnt linked a pull request Jan 31, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants