Skip to content

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

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 }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions