Skip to content

proxy server does not work #2126

Description

@SephVelut
  • Operating System: OSX
  • Node Version: v12.6.0
  • NPM Version: 6.9.0
  • webpack Version: 4.28.4
  • webpack-dev-server Version: 3.7.2
  • Browser: chrome Version 75.0.3770.100
  • This is a bug
  • This is a modification request

Given

module.exports = {
  devServer: {
    proxy: {
      '/login': {
        target: 'http://localhost:8000',
        changeOrigin: true,
        logLevel: 'debug'
      }
    }
  }
}

The dev server successfully proxies the request to localhost:8000 backend server. I see the request reaches the backend server and the backend server responds with

HTTP/1.1 202 Accepted
Content-Length: 0
Date: Tue, 16 Jul 2019 02:55:17 GMT
Server: MyServer

Despite that, the webpack dev server errors out with Proxy error: Could not proxy request /login from localhost:8080 to http://localhost:8000. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).

The Ajax request on the javascript side receives a 500 http error.

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