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

[electron] Enable WebSecurity #3500

Merged
merged 2 commits into from Jun 10, 2021
Merged

Conversation

matheusd
Copy link
Member

@matheusd matheusd commented Jun 8, 2021

Rebased on top of #3492

This re-disables the remote module on windows and enables the webSecurity feature.

webSecurity is used to tighten up external requests by enabling same-origin policy and disallowing mixed content.

In order to enable this in development mode, external requests are modified in to return a Allow-Origin: http://localhost:3000 header so that the main wallet page loaded via the HMR server is allowed to perform them. Additionally, we fix the OPTIONS request performed as a prefetch step to politeia servers when performing a POST request to always return a 200 response.

@matheusd matheusd requested a review from vctt94 June 9, 2021 21:28
@matheusd matheusd marked this pull request as ready for review June 10, 2021 12:00
Copy link
Member

@vctt94 vctt94 left a comment

Choose a reason for hiding this comment

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

tACK.

yarn build and yarn dev properly working on windows.

Good job on this PR! Long time I don't see decrediton dev working fine on windows :p

@alexlyp alexlyp merged commit f448243 into decred:master Jun 10, 2021
@matheusd matheusd deleted the disable-remote branch June 11, 2021 11:44
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 this pull request may close these issues.

None yet

3 participants