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

fix: preview csp value #3276

Merged
merged 13 commits into from
Mar 15, 2024
Merged

fix: preview csp value #3276

merged 13 commits into from
Mar 15, 2024

Conversation

bingryan
Copy link
Contributor

Description

add preview csp value

Related Issue

Fixes #3253

Usage

--csp-origin http://localhost can fix safari Content Security Policy for ord server locally

@bingryan
Copy link
Contributor Author

BTW, i add script-src-elem 'self' https://cdn.jsdelivr.net for default CONTENT_SECURITY_POLICY for some media, Please pay attention to this when code review.
@casey @raphjaph

@bingryan
Copy link
Contributor Author

@raphjaph code review plz :)

@raphjaph
Copy link
Collaborator

Did you test if it works on Safari now?

@bingryan
Copy link
Contributor Author

image Check again, it's working for add `--csp-origin http://localhost`
  • chrome
  • Firefox
  • Safari
  • Edge
  • Arc

Copy link
Collaborator

@raphjaph raphjaph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@casey casey merged commit c4d1c01 into ordinals:master Mar 15, 2024
5 checks passed
@casey
Copy link
Collaborator

casey commented Mar 15, 2024

@bingryan Thanks for the PR! I refactored it to hopefully make it a bit clearer. The big change was that instead of appending the CSP origin, if present, I replaced 'self' with the CSP origin.

@bingryan
Copy link
Contributor Author

@bingryan Thanks for the PR! I refactored it to hopefully make it a bit clearer. The big change was that instead of appending the CSP origin, if present, I replaced 'self' with the CSP origin.

thanks,casey.

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

Successfully merging this pull request may close these issues.

Preview broken on Safari on localhost
3 participants