Skip to content

devserver app request post url get 405 #2392

Description

@henryzp
  • Operating System: mac
  • Node Version: v10.17.0
  • NPM Version: 6.11.3
  • webpack Version: ^4.40.2
  • webpack-dev-server Version: 3.10.2
  • Browser: chrome
  • This is a bug
  • This is a modification request

Code

I implemented a server function myself, go to compile webpack。

The following code is to proxy local mock requests

// app => devServer.app
app.use(`${prefix}/*`, localMockHandler(prefix, true)); 

function localMockHandler() {
    // return a middleware
    return () => {

    }
}

The get request is normal, but the post request will report 405。

but I use webpack-dev-server@3.8.1,It is good and normal。

Expected Behavior

post request can normal。

Actual Behavior

post request break,it tell me 405,post method not allowed。

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