mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Minor changes
- fix lint error - move the code inside the clusterUrl.hostname check - add small Comment to explane the code Signed-off-by: dominic_dl <me@dominic.link>
This commit is contained in:
parent
2a520c0997
commit
18ab16c58b
@ -155,10 +155,12 @@ export class ContextHandler implements ClusterContextHandler {
|
||||
|
||||
if (this.clusterUrl.hostname) {
|
||||
headers.Host = this.clusterUrl.hostname;
|
||||
}
|
||||
|
||||
if (headers.Host.includes(":")) {
|
||||
headers.Host = "[" + headers.Host + "]";
|
||||
// fix current IPv6 inconsistency in url.Parse() and httpProxy.
|
||||
// with url.Parse the IPv6 Hostname has no Square brackets but httpProxy needs the Square brackets to work.
|
||||
if (headers.Host.includes(":")) {
|
||||
headers.Host = `[${headers.Host}]`;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user