Skip to content

transportMode: 'ws' interferes with proxy { ws: true } #2310

Closed
@joonas-lahtinen

Description

@joonas-lahtinen
  • Operating System: any
  • Node Version: any
  • NPM Version: any
  • webpack Version: any
  • webpack-dev-server Version: any
  • Browser: any
  • This is a bug
  • This is a modification request

Code

// webpack.config.js
...
devServer: {
  transportMode: 'ws',
  proxy: {
    '/api': {
      target: 'http://localhost:8888',
      ws: true,
    },
  },
},
...

Expected Behavior

Proxying Websockets works similar to transportMode: 'sockjs'

Actual Behavior

Websocket connections get closed with 400 Bad Request error.

For Bugs; How can we reproduce the behavior?

Simultaneously enable transportMode: 'ws' and proxy: { ws: true }

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