Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Add authorization header in node-proxy. #6444

Merged
merged 1 commit into from
Jan 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions node-proxy/lib/proxy/ProxyServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ function finish_websocket(upg_reqhost, proxy_server, ws) {
if (upgrade_req.headers["origin"]) {
zheaders.headers["Origin"] = upgrade_req.headers["origin"];
}

if (upgrade_req.headers["authorization"]) {
zheaders.headers["Authorization"] = upgrade_req.headers["authorization"];
}

/* Create a proxy websocket request we need to send. */
var proxy_ws = new WebSocket('ws://' + ws_endpoint + upg_requri, zheaders);
Expand Down