mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 11:48:06 +00:00
LibWeb/WebSocket: Include the User-Agent header on connection
This makes the WebSockets on https://pro.kraken.com/app/trade/btc-usd happier, but the page doesn't quite work yet.
This commit is contained in:
parent
943cc0e32a
commit
a2770bbcb7
Notes:
github-actions[bot]
2025-07-23 12:52:50 +00:00
Author: https://github.com/Lubrsi
Commit: a2770bbcb7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5561
1 changed files with 2 additions and 0 deletions
|
@ -213,6 +213,8 @@ ErrorOr<void> WebSocket::establish_web_socket_connection(URL::URL const& url_rec
|
|||
additional_headers.set("Cookie", cookies.to_byte_string());
|
||||
}
|
||||
|
||||
additional_headers.set("User-Agent", ResourceLoader::the().user_agent().to_byte_string());
|
||||
|
||||
m_websocket = ResourceLoader::the().request_client().websocket_connect(url_record, origin_string, protocol_byte_strings, {}, additional_headers);
|
||||
|
||||
m_websocket->on_open = [weak_this = make_weak_ptr<WebSocket>()] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue