Monday, 3 April 2017

Redirect post request

I have a web domain that is masking to my local server, but how do I get requests that is not a normal GET forwarded to the server ?

Address: ********* -> is masking: 0.0.0.0 some ip. 

And the server I'm building is a Nodejs server running express.

I want to be able to send a POST request to a route. /api/lights/state/ on the domain and forward the POST data to the server that is masked. But when I try that I'll get a cannot GET /api/lights/ even though the route in Nodejs is expecting a post.

It works if I direct the request directly towards the server's ip, but not via the domain..



via Lasse

No comments:

Post a Comment