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
Post a Comment