Skip to content

Can't configure devServer proxy many entries #956

Closed
@Toilal

Description

@Toilal

Version

3.0.0-beta.6

Reproduction link

return Object.keys(proxy).map(context => {

Steps to reproduce

Set up two proxies in devServer configuration

{
    '/api': {
      target: 'http://localhost:9488',
      pathRewrite: {'^/api/': '/api/'},
      xfwd: true
    },
    '/auth': {
      target: 'http://localhost:9485',
      pathRewrite: {'^/auth/': '/auth/'},
      xfwd: true
    }
  }

What is expected?

Both proxies should work.

What is actually happening?

It seems to configure the last entry only. In fact, it doesn't seem that devServer supports an array of proxy definition , an associative object should be given.


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions