-
Notifications
You must be signed in to change notification settings - Fork 1
fix: csp header changed placement #392
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
Conversation
|
Fixes placement issue from #384 |
4bc66f3 to
1c1c671
Compare
1c1c671 to
42f1de7
Compare
serverless.yml
Outdated
| ModeBlock: true | ||
| Override: false | ||
| ContentSecurityPolicy: | ||
| ContentSecurityPolicy: "default-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src 'self' ${env:IMAGE_SERVICE_URL} ${env:AVATAR_URL} ${env:AVATAR_BUCKET_URL}; connect-src 'self' ${env:BACKEND_URL_WITHOUT_HTTPS}" |
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.
Loading the image 'data:image/svg+xml;base64,....' violates the following Content Security Policy directive: "img-src 'self' https://api.dicebear.com https://wiki.sinnerschrader.com/rest/cas/1.0/avatar/server/ https://s2-staging-lara-avatar-bucket.s3.eu-central-1.amazonaws.com". The action has been blocked.
I think we need to add data: for img-src, too
42f1de7 to
b1782ce
Compare
serverless.yml
Outdated
| ModeBlock: true | ||
| Override: false | ||
| ContentSecurityPolicy: | ||
| ContentSecurityPolicy: "default-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src 'self' ${env:IMAGE_SERVICE_URL} ${env:AVATAR_URL} ${env:AVATAR_BUCKET_URL} data:; connect-src 'self' ${env:BACKEND_URL_WITHOUT_HTTPS}" |
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.
use-token-refresh-link.ts:34 Connecting to 'https://api.staging.lara.sinnerschrader.com/backend/oauth/token' violates the following Content Security Policy directive: "connect-src 'self' https://api.staging.lara.sinnerschrader.com/backend https://login.microsoftonline.com". The action has been blocked.
--> I think we actually need to get the https://api.staging.lara.sinnerschrader.com/ URL. it seems like BACKEND_URL_WITHOUT_HTTPS is with /backend 👎
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.
We could introduce "BACKEND_DOMAIN_NAME" and set it like here:
| echo "BACKEND_URL_WITHOUT_HTTPS=$(echo ${{ secrets.BACKEND_URL }} | sed 's/^https:\/\///')" >> $GITHUB_ENV |
-->
echo "BACKEND_DOMAIN_NAME=$(echo ${{ secrets.BACKEND_URL }} | sed 's/\backend//')" >> $GITHUB_ENV
(Also make sure to add it to the .env.example)
b1782ce to
e58ad19
Compare
No description provided.