mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-05 16:15:54 +00:00
Allow the advertised TCP slave agent port number to be modified.
This allows TCP slave agent port to be reverse proxied.
This commit is contained in:
1 parent
64e832f9d6
commit
86bf6b7603
3 files changed
+18
-3
No files matched your search
@@ -1887,9 +1887,10 @@ public class Functions {
|
||||
|
||||
TcpSlaveAgentListener tal = j.tcpSlaveAgentListener;
|
||||
if (tal !=null) {
|
||||
rsp.setIntHeader("X-Hudson-CLI-Port", tal.getPort());
|
||||
rsp.setIntHeader("X-Jenkins-CLI-Port", tal.getPort());
|
||||
rsp.setIntHeader("X-Jenkins-CLI2-Port", tal.getPort());
|
||||
int p = TcpSlaveAgentListener.CLI_PORT !=null ? TcpSlaveAgentListener.CLI_PORT : tal.getPort();
|
||||
rsp.setIntHeader("X-Hudson-CLI-Port", p);
|
||||
rsp.setIntHeader("X-Jenkins-CLI-Port", p);
|
||||
rsp.setIntHeader("X-Jenkins-CLI2-Port", p);
|
||||
rsp.setHeader("X-Jenkins-CLI-Host", TcpSlaveAgentListener.CLI_HOST_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user