Skip to content

Set Vite HMR Websocket protocol

Stan Hu requested to merge sh-fix-hmr-https into main

What does this merge request do and why?

When NGINX is enabled with HTTPS, we need to use the wss protocol instead of the default ws.

How to set up and validate locally

With a GDK with NGINX and HTTPS enabled, try to use Vite:

nginx:
  bin: "/usr/local/bin/nginx"
  enabled: false
  http:
    enabled: false
    port: 8080
  http2:
    enabled: false
  listen: 127.0.0.1
  ssl:
    certificate: localhost.crt
    key: localhost.key
vite:
  enabled: false
  hot_module_reloading: true
  port: 3038
  1. Check out to this merge request's branch.
  2. Run gdk reconfigure.
  3. gdk restart nginx rails-web vite
  4. Navigate to GitLab and check the browser for wss requests.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Stan Hu

Merge request reports

Loading