Monday 23 April 2018

http-Proxy : I can proxy the index.html, but css and js not found

Hi there!So I'm trying hard to set up my production env on windows server.I'm using express to serve a React app with static file, and I'm using http-Proxy (also tried the express version) to reverse proxy my app.My issue : The index.html file is proxied, but then the html file try to get my .js and .css file. Sadly, he tried to do it on my proxied url.Ex :React app url : localhost:2530Proxy url : localhost/testMy index.html is loaded, but then it tries to open localhost/test/main.js and localhost/test/main.css. He can't find them as both those files are at localhost:2530.I can't seem to find a solution. :(Thank you!

Submitted April 23, 2018 at 03:09PM by Kardiamond

No comments:

Post a Comment