Wednesday, 12 June 2019

HTTP requests with Vuejs/NWjs local client trouble

While building a vuejs + nwjs local client that accesses an external API for information I come across CORS limitations. I’ve read all about it and understand how this works. My question is how I could still implement a way for the local client to make HTTP requests. The solution I’ve found is to add an expressjs ‘proxy’ server and tunnel all requests through that, but when researching this option, I see a lot of notices to only use this in dev environments. Is there anybody who has some input about this, or another work around? Is there any possibility to make the requests from the local machine and send them to vuejs? The idea is to have a vuejs/nwjs client to make GET & POST requests to an api and represent the responses in vuejs, all functionality should be through the local client ( no routing through another external server).

Submitted June 12, 2019 at 10:46AM by ratch90

No comments:

Post a Comment