Proxy not working
See original GitHub issueHi,
I’m using the following configuration, and running webpack-dev-server --content-base public
proxy: {
'/api/*': {
target: 'http://localhost:4907',
rewrite: function(req) {
console.log(req)
req.url = req.url.replace(/^\/api/, '');
}
}
},
All requests e.g. /api/user/current have a 404 response, and my console.log never fires. Is there some other part of the config that I’d need to change?
Thanks, Chris
Issue Analytics
- State:
- Created 8 years ago
- Comments:22 (3 by maintainers)
Top Results From Across the Web
Unable to Connect to Proxy Server in Windows 10
Unable to Connect to Proxy Server in Windows 10 · 1. Disable Proxy Settings · 2. Reset Internet Options · 3. Clear Browser...
Read more >How to Fix “There Is Something Wrong With the Proxy ...
Go to the Control Panel. · Click on Internet Options. · Click on LAN (Local Area Network) Settings. · Uncheck the box that...
Read more >FIX: Unable to Connect to proxy server in Windows 10/11
How can I fix Unable to connect to proxy server? · 1. Reset Internet options · 2. Disable proxy · 3. Use a...
Read more >Guide to Solving Proxy Status Errors
How to fix: Fixing this issue is simple. You need to update your proxy server settings by including whitelisted IPs and use appropriate ......
Read more >How to fix "There is something wrong with the proxy server ...
Method 3: Checking your Proxy Settings · On your keyboard, press Windows Key+S. · Type “control panel” (no quotes), then hit Enter. ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just incase anyone else is running into this issue - the PHP standalone server also requires “[::1]” instead of localhost:
We got 404 from azure api servers, and we solved it by adding
changeOrigin: trueto our proxy config.