fix(cors): set url with chrome-extension:// as regex origin#499
Open
istudyatuni wants to merge 1 commit intoActivityWatch:masterfrom
Open
fix(cors): set url with chrome-extension:// as regex origin#499istudyatuni wants to merge 1 commit intoActivityWatch:masterfrom
istudyatuni wants to merge 1 commit intoActivityWatch:masterfrom
Conversation
There was a problem hiding this comment.
👍 Looks good to me! Reviewed everything up to 8adbf9d in 55 seconds
More details
- Looked at
48lines of code in1files - Skipped
0files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. aw-server/src/endpoints/cors.rs:15
- Draft comment:
Unnecessaryclone()onconfig.cors. Useiter()instead ofclone().into_iter()to avoid cloning the vector unnecessarily. This applies to lines 15 and 37. - Reason this comment was not posted:
Confidence changes required:50%
The use ofclone()onconfig.corsis unnecessary sinceinto_iter()is called immediately after, which takes ownership of the vector. This can be optimized by removing theclone()call.
Workflow ID: wflow_ouafDXkd07uEHSkW
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
8adbf9d to
3a51231
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #498
Important
Modify
cors()incors.rsto handle Chrome extension URLs as regex origins and add error logging.cors()incors.rsto handle Chrome extension URLs as regex origins instead of exact origins.config.corsto separate Chrome extension URLs intoallowed_regex_origins.CHROME_EXTENSION_PREFIXfor identifying Chrome extension URLs.This description was created by
for 8adbf9d. It will automatically update as commits are pushed.