Vite HMR websocket should be configured with TLS through nginx

Overview

Currently the HMR websocket used by Vite is defaulting to localhost, see https://gitlab.com/gitlab-org/gitlab/-/blob/1b70913da5fe55298e854ac523a0f6f91e982347/vite.config.js#L106.

We should allow this traffic to go through nginx with TLS if available, and proxy it just like we do with webpack: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/70d868ab7cecf2981eb77681009273ba090bffef/support/templates/nginx/conf/nginx.conf.erb#L96

Impacted categories

The following categories relate to this issue:

  • gdk-reliability - e.g. When a GDK action fails to complete.
  • gdk-usability - e.g. Improvements or suggestions around how the GDK functions.
  • gdk-performance - e.g. When a GDK action is slow or times out.

Steps to replicate (optional)

Use https with nginx, and enable vite.

Proposal (optional)

Environment (optional)

  • Operating system name: <!-- output of `uname -a` command -->
  • Architecture: <!-- output of `arch` command -->
  • The contents of your gdk.yml (if any)
  • Ruby version: <!-- output of `ruby --version` command -->
  • GDK version: <!-- output of `git rev-parse --short HEAD` command -->
Assignee Loading
Time tracking Loading