text: Title: Dash.run return url with 404 when calling JupyterDash.infer_jupyter_proxy_config()
  Body: Hello, 
  I'm migrating several Jupyter Notebooks using dash. 
  It used to rely on https://pypi.org/project/jupyter-plotly-dash/ and I upgraded all python librairies and migrating in miniforge environment. 
  The notebooks are distributed through a jupyterhub, behind nginx as reverse proxy. Both nginx and jupyterhub are launched inside docker containers. 
  
  **Describe the bug**
  I could not succeed to get Dash visible, even with simplest example. 
  
  1) if calling  jupyter_dash.infer_jupyter_proxy_config() in this page : https://dash.plotly.com/dash-in-jupyter, I got a Jupyterhub 404 error. The provided url ([lab/user/fb03416l/proxy/8050/](https://HOST/lab/user/USER_ID/proxy/8050/) seems not to be correct. 
  
  ![image](https://github.com/plotly/dash/assets/8361582/5f5c722b-2230-4aaf-b7fb-4ece9fa30705)
  ![image](https://github.com/plotly/dash/assets/8361582/337b4317-f550-4e3c-8fa6-a3cfb21d4932)
  
  2) it does not work either without calling this function, whatever jupytermode argument given to Dash.run() client tries to connect to local adress 127.0.0.1:PORT
  ![image](https://github.com/plotly/dash/assets/8361582/a10790b2-79c4-4d3d-a040-016640c4c0f3)
  
  Hoping that someone will be able to help me, thx a lot, please see below my configuration files. 
  
  **Describe your context**
  
  docker-compose.yaml
  ```
  services:
    nginx:
      container_name: 'nginx-service'
      image: nginx:alpine
      volumes:
        - /appli/visuconti/visuconti_install/nginx.conf.template:/etc/nginx/templates/nginx.conf.template:ro
        - /etc/nginx/ssl:/etc/nginx/ssl:ro
      network_mode: host
      environment:
        - SERVER_NAME='servername'
      restart: always
    jupyterhub:
      container_name: "jupyterhub-service"
      build: 
        context: .
        dockerfile: jupyterhub.Dockerfile
      volumes:
        - /appli/visuconti/visuconti_install/jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py:ro
        - /home:/home
      network_mode: host
      restart: always
  ```
  
  nginx.conf.template
  ```
  map $http_upgrade $connection_upgrade {
      default upgrade;
      ''      close;
  }
  
  # HTTP server to redirect all 80 traffic to SSL/HTTPS
  server {
      listen 80;
      server_name ${SERVER_NAME};
  
      # Redirect the request to HTTPS
      return 302 https://$host$request_uri;
  }
  
  # HTTPS server to handle JupyterHub
  server {
      listen 443 ssl;
  
      server_name ${SERVER_NAME};
  
      ssl_certificate /etc/nginx/ssl/feevisu.crt;
      ssl_certificate_key /etc/nginx/ssl/feevisu.key;
  
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_prefer_server_ciphers on;
      #ssl_dhparam /etc/ssl/certs/dhparam.pem;
      ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
      ssl_session_timeout 1d;
      ssl_session_cache shared:SSL:50m;
      ssl_stapling on;
      ssl_stapling_verify on;
      add_header Strict-Transport-Security max-age=15768000;
  
      # Managing literal requests to the JupyterHub frontend
      location /lab {
          proxy_pass http://0.0.0.0:8000;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header Host $host;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  
          # websocket headers
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection $connection_upgrade;
          proxy_set_header X-Scheme $scheme;
  
          proxy_buffering off;
      }
  
      # Managing requests to verify letsencrypt host
      location ~ /.well-known {
          allow all;
      }
  }
  ```
  jupyterhub.Dockerfile
  ```
  FROM condaforge/miniforge3
  ARG DEBIAN_FRONTEND=noninteractive
  COPY environment.yaml ./environment.yaml
  RUN mamba env create -f ./environment.yaml
  # JUPYTER LAB BUILD
  RUN conda run -n visuconti-env /bin/bash -c '\
      jupyter lab clean && \
      jupyter lab build'
  RUN apt-get update && apt-get install -y \
      sssd \
      krb5-user \
      net-tools \
      sssd-tools \
      sssd-dbus \
      krb5-user \
      krb5-locales \
      libkrb5-26-heimdal
  ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "visuconti-env", "jupyterhub", "-f","/config/jupyterhub_config.py"]
  ```
  
  
  
  environment.yaml
  ```
  name: visuconti-env
  dependencies:
    - python=3.7
    - jupyterlab=3.6.6
    - jupyterhub=4.0.2
    - dash=2.14.0
    - numpy=1.21.6
    - netCDF4=1.6.0
    - pandas=1.3.5
    - scipy=1.7.3
  
  ```
  jupyterhub_config.py
  ```
  import os
  import grp
  os.umask(0o002)
  c.JupyterHub.admin_access = True
  c.JupyterHub.authenticator_class = 'dummy' #'jupyterhub.auth.PAMAuthenticator'
  c.JupyterHub.bind_url = 'http://:8000/lab'
  c.JupyterHub.cleanup_proxy = True
  c.JupyterHub.cleanup_servers = True
  c.JupyterHub.hub_connect_ip = '127.0.0.1'
  c.JupyterHub.hub_connect_url = 'http://127.0.0.1:12424'
  c.JupyterHub.hub_ip = '127.0.0.1'
  c.JupyterHub.hub_port = 12424
  c.JupyterHub.reset_db = True
  c.JupyterHub.spawner_class = 'jupyterhub.spawner.LocalProcessSpawner'
  c.Spawner.debug = True
  c.Spawner.default_url = '/lab'
  c.Spawner.env_keep = ['PATH', 'PYTHONPATH', 'CONDA_ROOT', 'CONDA_DEFAULT_ENV', 'VIRTUAL_ENV', 'LANG', 'LC_ALL']
  c.Authenticator.allowed_users = {'fb03416l'} 
  c.Authenticator.delete_invalid_users = True
  c.Authenticator.enable_auth_state = False
  c.LocalAuthenticator.create_system_users = True
  ```