-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Consider the config below. By default webpack-dev-server will proxy /api/
requests to http://api.io/api/
. I need to make it pass /api/
requests to http://api.io
. I there any way to achieve this? I tried to look into into bypass and rewrite settings on proxyOptions but i seems that they aren't suited for this particular use case. For example, if I directly remove /api/
in bypass function it will just pass request to the next middleware in webpack-dev-server instead of requesting target.
devServer: {
port: 80,
proxy: {
'/api/*': {
host: 'api.io',
target: 'http://192.168.33.13/'
}
}
}
Metadata
Metadata
Assignees
Labels
No labels