Skip to content

Commit 21dc91c

Browse files
committed
Intercept https requests only
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
1 parent b79f389 commit 21dc91c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/rancher-deskboard/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ const interceptApiRequest = (axios: any) => {
3636

3737
axios.interceptors.request.use((config: any) => {
3838
// ensure that http traffic to properly route to the proxy server
39-
if (config.url.includes(':6120')) {
39+
if (config.url.includes(':6120') && config.url.includes('https')) {
4040
config.url = config.url
4141
.replace('https://', 'http://')
4242
}
4343

44-
if (config.url.includes(':9443')) {
44+
if (config.url.includes(':9443') && config.url.includes('https')) {
4545
config.url = config.url
4646
.replace('https://', 'http://')
4747
.replace(':9443', ':6120');

0 commit comments

Comments
 (0)