Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 2 tasks
joonas-lahtinen opened this issue Nov 9, 2019 · 1 comment
Closed
1 of 2 tasks

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

joonas-lahtinen opened this issue Nov 9, 2019 · 1 comment

Comments

@joonas-lahtinen
Copy link
Contributor

  • 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 }

@hiroppy
Copy link
Member

hiroppy commented Dec 6, 2019

fixed by #2311, thank!

@hiroppy hiroppy closed this as completed Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants