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

fix(extension): #107: allow http for localhost #129

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

VanishMax
Copy link
Contributor

Closes #107

  1. Changes to the manifest to inject content scripts into http://localhost
  2. Changes to the assertValidSender function to allow http://localhost

@VanishMax VanishMax requested a review from a team July 26, 2024 12:49
@VanishMax VanishMax self-assigned this Jul 26, 2024
Copy link

changeset-bot bot commented Jul 26, 2024

⚠️ No Changeset found

Latest commit: e9019d1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

apps/extension/src/senders/validate.ts Outdated Show resolved Hide resolved
apps/extension/src/senders/validate.ts Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd like to condition the manifest inclusion of localhost but that would require some additional build config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you mean by this?

Copy link
Contributor

@turbocrime turbocrime left a comment

Choose a reason for hiding this comment

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

the ValidSender type needs correction but other than that, this would work

@@ -13,6 +13,10 @@ type ValidSender = chrome.runtime.MessageSender & {
url: `${ValidProtocol}//${string}/${string}`;
Copy link
Contributor

@turbocrime turbocrime Jul 26, 2024

Choose a reason for hiding this comment

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

the origin/url type are incorrect now that validprotocol may conditionally be http at any moment. i don't think it matters anywhere so probably just set these to 'string'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to string

@turbocrime
Copy link
Contributor

@VanishMax
Copy link
Contributor Author

@turbocrime pinging for your re-review

@turbocrime turbocrime force-pushed the fix/#107-allow-http-for-localhost branch from f0198bb to e9019d1 Compare August 5, 2024 18:34
@turbocrime turbocrime merged commit 8141aa4 into main Aug 5, 2024
3 checks passed
@turbocrime turbocrime deleted the fix/#107-allow-http-for-localhost branch August 5, 2024 18:36
grod220 added a commit that referenced this pull request Aug 8, 2024
grod220 added a commit that referenced this pull request Aug 8, 2024
* Revert "fix(extension): #107: allow http for localhost (#129)"

This reverts commit 8141aa4.

* Update version
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.

Accept localhost connections without https
2 participants