-
Notifications
You must be signed in to change notification settings - Fork 3k
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 CSP console error when staging website is loaded #13054
Conversation
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.
👍
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @Julesssss in version: 1.2.33-0 🚀
|
1 similar comment
🚀 Deployed to staging by @Julesssss in version: 1.2.33-0 🚀
|
@mountiny I don't think this worked. Applause and I can still see the error in staging #13099 (comment) |
🚀 Deployed to staging by @Julesssss in version: 1.2.33-0 🚀
|
🚀 Deployed to production by @luacmartins in version: 1.2.33-7 🚀
|
🚀 Deployed to production by @luacmartins in version: 1.2.33-7 🚀
|
Correct, this did not work as noted in the issue, I will open this to external contributors, because this seems like an issue with the react app and not related to our CSP set up and I could not really figure out what to do about this. Reverting this. |
Details
When you load prod or staging web app, the first error we get is Content security policy error inline loading scripts
Since I dont think we have a way to test this locally, I am only adding this variable to .env.staging file so we can see if the error will be present on staging web app or not, and the builds work as expected. Then we would create a follow up to fix this for production too.
I found out about this from couple of articles but this one is the best https://drag13.io/posts/react-inline-runtimer-chunk/index.html
Fixed Issues
Partially #12943
Tests
No specific tests locally, the CSP depends on CSP rules on our serverswhich I am not sure how I can mimic locally. I have built the staging desktop app locally and it worked fine.
Offline tests
QA Steps
staging.new.expensify.com
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Screenshots/Videos
This change does not influence the look of the platforms.
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android