mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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:
Notes:
github-actions[bot]
2025-07-23 12:52:50 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/a2770bbcb71 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5561
@@ -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>()] {
|
||||
|
||||
Reference in New Issue
Block a user