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

Add electron security token to backend request service #11207

Merged
merged 1 commit into from
May 26, 2022

Conversation

msujew
Copy link
Member

@msujew msujew commented May 26, 2022

What it does

Just after merging #11043, I noticed a minor issue with requests to the localhost in Electron. When trying to read the README.md of an already installed extension, the backend rejects the request (although it's coming from the backend server), since it does not use the electron security token. This change addresses this issue by adding the security token if we perform a request to the localhost.

How to test

  1. Download and install an extension
  2. Open the extension overview/readme
  3. It should render the readme correctly
  4. Other requests to the backend localhost address should also run as expected

Review checklist

Reminder for reviewers

@msujew msujew added the messaging issues related to messaging label May 26, 2022
@msujew msujew requested a review from paul-marechal May 26, 2022 13:43
@msujew
Copy link
Member Author

msujew commented May 26, 2022

@paul-marechal Alternatively, we can change it so Electron requests aren't tunneled through the backend. This removes the need to add special backend handling for this, at the cost of some confusion. I.e. some requests getting through the proxy (XHR which uses the browser's proxy resolution), while some others don't (backend requests).

Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

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

@msujew Let's avoid confusion and go with this.

@msujew msujew merged commit 0e6ca84 into master May 26, 2022
@github-actions github-actions bot added this to the 1.26.0 milestone May 26, 2022
@vince-fugnitto vince-fugnitto deleted the msujew/proxy-security-token branch September 29, 2022 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
messaging issues related to messaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants