问题
In a windows server 2008 R2 Standard, I have a node 8 app that runs on localhost:3000.
In the same server , there is also a default website in ISS7 , in port 80, with the URL myproject.com
I managed to create a reverse proxy in that default ISS7 website, according to this tutorial. If I go to myproject.com, I get the node app
If I start searching, and basically doing a GET to myproject.com/laptops/names?name=hp&cat=offers
, the status code is 200 OK , but I get back a json of empty results.
But I shouldn't get empty results, because the database is full of this category. In my laptop locally, in the same app, I get results. The node route for searching is not protected (no login, no token).
The node app also contains angular 6 for the front-end. The angular service does a get like this
return this.http.get('/laptops/names?name=' +name+ '&cat=' +cat, {headers:headers})
and the node route is set like router.get('/laptops/names',(req, res)=>{.....
I also tried the angular service like this return this.http.get('http://localhost:3000/laptops/names?name=' +name+ '&cat=' +cat, {headers:headers})
but I get just failed, with no code. At least having the URL in angular like so /laptops/names?name=....
gives a 200 OK status.
So how can I fix this and get results back? I dont know what causes this? The server? The proxy? Please advice.
Thanks
来源:https://stackoverflow.com/questions/54520869/cannot-get-data-from-node-app-via-iss-reverse-proxy