-
Notifications
You must be signed in to change notification settings - Fork 39
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
Added conditional content-security-policy header #160
Conversation
If any of the URLs start with https then we add the Content-Security-Policy : upgrade-insecure-requests header to DICOMwebClient requests. Addresses #159
Let me know if there's a better way of doing this, thanks! |
Visit the preview URL for this PR (updated for commit c48584a): https://idc-external-006--pr160-dev-cg-upgrade-insec-409byuig.web.app (expires Thu, 27 Jul 2023 19:29:11 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 88aacecd98ba54d2f9c8d201a9444e43d1ad8307 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a single JSON.stringify(serverSettings).includes('https')
would be enough to set this header. I'm not sure if this should be here though, maybe we need to add this change to dicomweb-client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If any of the URLs start with https then we add the
Content-Security-Policy : upgrade-insecure-requests header to
DICOMwebClient requests. Addresses #159