mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Elaborate on open questions regarding CORS of browser extensions
This commit is contained in:
parent
119dbaef97
commit
5bf056e584
1 changed files with 4 additions and 1 deletions
|
@ -144,7 +144,10 @@ func (mh *mainHandler) handle(w http.ResponseWriter, r *http.Request) error {
|
|||
// Origin (without port) matches Host.
|
||||
case originURL.Scheme == "chrome-extension":
|
||||
// Allow access for the browser extension
|
||||
// TODO(ppacher): can we improve that check here?
|
||||
// TODO(ppacher):
|
||||
// This currently allows access from any browser extension.
|
||||
// Can we reduce that to only our browser extension?
|
||||
// Also, what do we need to support Firefox?
|
||||
case devMode() &&
|
||||
utils.StringInSlice(allowedDevCORSOrigins, originURL.Hostname()):
|
||||
// We are in dev mode and the request is coming from the allowed
|
||||
|
|
Loading…
Add table
Reference in a new issue