mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Send Origin on WebSocket connection
Some services using WebSockets require that the request contains the Origin header, otherwise these services will return a 403 Forbidden response. WebSocketServer already supports sending the Origin header, however LibWeb did not send the origin with the IPC request.
This commit is contained in:
parent
21ba9c808e
commit
39409438b2
Notes:
sideshowbarker
2024-07-17 18:01:06 +09:00
Author: https://github.com/msvisser
Commit: 39409438b2
Pull-request: https://github.com/SerenityOS/serenity/pull/12797
2 changed files with 5 additions and 4 deletions
|
@ -35,7 +35,7 @@ class WebSocketClientManager : public Core::Object {
|
|||
public:
|
||||
static WebSocketClientManager& the();
|
||||
|
||||
RefPtr<Protocol::WebSocket> connect(const AK::URL&);
|
||||
RefPtr<Protocol::WebSocket> connect(const AK::URL&, String const& origin);
|
||||
|
||||
private:
|
||||
static ErrorOr<NonnullRefPtr<WebSocketClientManager>> try_create();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue