Originally filed as: https://github.com/mozilla/geckodriver/issues/2048 If clients specify `localhost` as allowed origin we should automatically allow all the resolvable local IP addresses as well, which would be `127.0.0.1` for IPv4 and if IPv6 is available `[::1]`. Right now it end-up with a failure and a connection drop: ``` 1664306204342 RemoteAgent DEBUG Incorrect Origin header, allowed origins: [http://localhost:9222] JavaScript error: chrome://remote/content/server/WebSocketHandshake.jsm, line 174: Error: The handshake request has incorrect Origin header http://127.0.0.1:9222 ``` Note that geckodriver is also affected here: ``` ➜ gecko-hg curl http://127.0.0.1:4444/session -X POST -H "Origin: http://localhost:4444" {"value":{"error":"unknown error","message":"Invalid Origin header http://localhost:4444","stacktrace":""}} ``` So I assume that we want to have the code in geckodriver and in Remote Agent (when we collect all the command line arguments for `--remote-allow-origins`)? We should discuss and move the bug to the geckodriver component if needed.
Bug 1792647 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
If clients specify `localhost` as allowed origin we should automatically allow all the resolvable local IP addresses as well, which would be `127.0.0.1` for IPv4 and if IPv6 is available `[::1]`. Right now it end-up with a failure and a connection drop: ``` 1664306204342 RemoteAgent DEBUG Incorrect Origin header, allowed origins: [http://localhost:9222] JavaScript error: chrome://remote/content/server/WebSocketHandshake.jsm, line 174: Error: The handshake request has incorrect Origin header http://127.0.0.1:9222 ```