Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CORS Access-Control-Allow-Origin header stripped by watchguard

I have a website on www.example.com that uses AJAX to access JSON via a nodejs-API on api.example.com. (Cross-domain!) I need the PUT and DELETE as HTTP-methods, thats why I can't use jsonp, i looked up how CORS works, and implemented that via the Access-Control-Allow-Origin headers.

When i work on my local environment (www.example.dev and api.example.dev) my setup works. My API return the correct headers (Access-Control-Allow-Origin) and I succeed in doing cross domain requests.

When I deploy online, my setup doesn't work anymore, because the headers get blocked by the company watchguard firewall. I could ask to allow my public API, but i'm afraid someone else will have the same issues in his or her restricted environment.

Is there any other way to solve this?

like image 847
Ernie Avatar asked Nov 13 '22 04:11

Ernie


1 Answers

For those interested: I use easyXDM for cross domain messaging. That solved my problem. http://easyxdm.net/wp/

like image 169
Ernie Avatar answered Nov 15 '22 13:11

Ernie