Created
December 7, 2018 13:22
-
-
Save aliselcuk/e21896ccc2d20729d19092ab6a03b98e to your computer and use it in GitHub Desktop.
Working webpack-dev-server proxy config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| devServer: { | |
| host: 'acp.superv.dev.io', | |
| port: 8080, | |
| proxy: { | |
| '/api': { | |
| target: 'http://api.superv.dev.io', | |
| pathRewrite: { '^/api': 'acp' }, | |
| changeOrigin: true, | |
| }, | |
| }, | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
{ KEY POINT } Axios base url should point to:
http://acp.superv.dev.io:8080/apiAnd it will proxy this:
http://acp.superv.dev.io:8080/api/loginto this:
http://api.superv.dev.io/acp/login