curl - Why my jQuery request doesn't pass cross-origin even through nginx proxy? -


we have nginx proxy header.

nginx::server: |      expires       modified +5m;      large_client_header_buffers  4 32k;              add_header    access-control-allow-origin *; 

that's configuration puppet assume should work domain. try curl response correct as.

* upload sent off: 406 out of 406 bytes < http/1.1 200 ok < access-control-allow-origin: * < cache-control: max-age=300 < content-type: application/json; charset=utf-8 < date: mon, 08 feb 2016 16:52:15 gmt < expires: mon, 08 feb 2016 16:57:15 gmt < content-length: 542 < connection: keep-alive 

however, when try jquery post cors error.

jquery.ajax('theurl', {   contenttype: 'application/json',   method: 'post',   data: json.stringify({'json'}),   datatype: 'json',   crossdomain: true }) 

the application hapi.js simple this.

var server = new hapi.server(); server.connection({ port: config.port }); 

not sure if i'm missing anything?


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -