-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Both `mini-browser` and `plugin-ext` contributes WebSocket checks refuse WebSocket connections originating from within their served content, but it prevented all connections when serving from the `{{hostname}}` pattern. This commit handles the case when such a pattern is used and disables the origin check in such a case. This is not totally fool-proof as some host/pattern combinations can still lead to problems. e.g. host is `sweet-potato.com` and the pattern is `{{uuid}}-{{hostname}}`. The generated regex will be `^.+-.+$` which still matches `sweet-potato.com`. You should always include a unique string inside the pattern to avoid such situations, like `{{uuid}}-webview-{{hostname}}`. This commit also moves the `mini-browser` file serving to `/mini-browser` to avoid conflicts when hosting on the same root origin. Signed-off-by: Paul <[email protected]>
- Loading branch information
1 parent
ae35f9c
commit 4ebb910
Showing
6 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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