Skip to content
This repository was archived by the owner on Jul 13, 2021. It is now read-only.
This repository was archived by the owner on Jul 13, 2021. It is now read-only.

Option to set websocket path #105

@bryanlarsen

Description

@bryanlarsen

Feature Use Case

Using webpack-hot-client under some sort of orchestration system to tie together a bunch of microservers, like an ingress server in minikube or the kubernetes in docker-for-mac

Feature Proposal

Allow the websocket path to be specified both on the client and the server. I'd prefer they both be set the same so I don't need to use url-rewriting.

Current ugly workaround

setting options:

host: {
    server: '0.0.0.0',
    client: 'localhost/hot',
},
port: 3002

and useing the ingress:

---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: hot
  annotations:
    kubernetes.io/ingress.class: "nginx"
    ingress.kubernetes.io/ssl-redirect: "false"
    nginx.org/websocket-services: "app"
    nginx.ingress.kubernetes.io/rewrite-target: '/'
spec:
  rules:
  - http:
      paths:
        - path: /hot:3002
          backend:
            serviceName: app
            servicePort: 3002

It's an ugly hack, but by setting host.client to 'localhost/hot', the resulting url is 'ws://localhost/hot:3002'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions