Repository: stable-diffusion-webui
Issue: [Bug]: version 1.2.1 is not friendly to reverse proxy support in kubernetes
Labels: bug-report,platform:mac

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

I run the UI on Kubernetes. When I use ingress or nodeport to access the UI, it often appears:
```
WebSocket connection to 'wss://xxxx/queue/join' failed: 
```
software version:
- kubernetes: 1.22.10
- ingress controller：traefok 2.7
- stable-diffusion-webui: 1.2.1

### Steps to reproduce the problem

1. running ui on kubernetes
2. use ingress or nodeport to access the UI
 
<img width="1426" alt="image" src="https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/17611638/88d83b28-46d8-4582-b12e-e25c149bf8a3">


### What should have happened?

should not report an error

### Commit where the problem happens

version: v1.2.1  •  python: 3.10.6  •  torch: 2.0.1+cu118  •  xformers: 0.0.17  •  gradio: 3.29.0  •  checkpoint: cc6cb27103

### What platforms do you use to access the UI ?

MacOS

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
python webui.py --listen --xformers --enable-insecure-extension-access
```


### List of extensions

<img width="1037" alt="image" src="https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/17611638/d3516a98-cc84-4249-b2a6-c2f8a5d65d17">


### Console logs

```Shell
[AddNet] Updating model hashes...

[00:00, ?it/s]
[00:00, ?it/s]
[AddNet] Updating model hashes...

[00:00, ?it/s]
[00:00, ?it/s]
ControlNet v1.1.183
ControlNet v1.1.183
Image Browser: ImageReward is not installed, cannot be used.
Calculating sha256 for /content/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.ckpt: *Deforum ControlNet support: enabled*
Image Browser: Creating database
Image Browser: Database created
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 8.4s (import torch: 1.1s, import gradio: 1.3s, import ldm: 0.9s, other imports: 1.0s, load scripts: 1.7s, create ui: 2.1s, gradio launch: 0.2s).
cc6cb27103417325ff94f52b7a5d2dde45a7515b25c255d8e396c90014281516
Loading weights [cc6cb27103] from /content/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.ckpt
Creating model from config: /content/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.

Downloading (…)olve/main/vocab.json:   0%|          | 0.00/961k [00:00<?, ?B/s]
Downloading (…)olve/main/vocab.json: 100%|██████████| 961k/961k [00:00<00:00, 1.12MB/s]
Downloading (…)olve/main/vocab.json: 100%|██████████| 961k/961k [00:00<00:00, 1.12MB/s]

Downloading (…)olve/main/merges.txt:   0%|          | 0.00/525k [00:00<?, ?B/s]
Downloading (…)olve/main/merges.txt: 100%|██████████| 525k/525k [00:00<00:00, 838kB/s]
Downloading (…)olve/main/merges.txt: 100%|██████████| 525k/525k [00:00<00:00, 837kB/s]

Downloading (…)cial_tokens_map.json:   0%|          | 0.00/389 [00:00<?, ?B/s]
Downloading (…)cial_tokens_map.json: 100%|██████████| 389/389 [00:00<00:00, 3.03MB/s]

Downloading (…)okenizer_config.json:   0%|          | 0.00/905 [00:00<?, ?B/s]
Downloading (…)okenizer_config.json: 100%|██████████| 905/905 [00:00<00:00, 10.8MB/s]

Downloading (…)lve/main/config.json:   0%|          | 0.00/4.52k [00:00<?, ?B/s]
Downloading (…)lve/main/config.json: 100%|██████████| 4.52k/4.52k [00:00<00:00, 27.9MB/s]
Applying xformers cross attention optimization.
```


### Additional information

none