I'm hitting a major road block while consuming services POST
from this client who has no Access-Control-Allow-Origin
at all.
I've tried following solutions or are you saying it's not possible at all?
- Looked into JSONP but that's limited to GET only.
- Created a service on my domain that can make a request to client domain. Ended up with
{ [Error: socket hang up] code: 'ECONNRESET' }
- Haven't tested, but can I've it accomplished using node-curl. https://www.npmjs.com/package/node-curl
Please advise.
So, why just not add this header? Just one line of code :)
You may run your own server which will forward requests to that service (nginx can easily do that, take a peek).
In a nutshell:
frontend app -> your proxy with CORS headers (like nginx) -> api service