Re: Multiple Domain CORS

2019-04-12 Thread Sathish Kumar
Hi Andrey, Thanks a lot for the solution, it working great in our Prod. You saved my day!!!. On Fri, Aug 10, 2018, 8:46 PM Andrey Oktyabrskiy wrote: > On 10.08.2018 15:17, Andrey Oktyabrskiy wrote: > > ### /etc/nginx/inc/cors_options.inc > > if ($request_method = 'OPTIONS') { > >add_header

Re: Multiple Domain CORS

2018-08-10 Thread Andrey Oktyabrskiy
On 10.08.2018 15:17, Andrey Oktyabrskiy wrote: ### /etc/nginx/inc/cors_options.inc if ($request_method = 'OPTIONS') {   add_header Access-Control-Allow-Credentials    true;   add_header Access-Control-Allow-Origin $cors_origin;   add_header Access-Control-Allow-Methods    OPTIONS; -

Re: Multiple Domain CORS

2018-08-10 Thread Andrey Oktyabrskiy
On 10.08.2018 14:38, Sathish Kumar wrote: Is there anyway to allow CORS domain like based on Host Origin.For Options, Get and other methods. Something like this should do what you want: location / { include inc/cors_options.inc; ... include inc/cors_headers.inc; } ### /etc/nginx/inc/cors

Multiple Domain CORS

2018-08-10 Thread Sathish Kumar
Hi All, I would like to use cloudfront.net content inside my webapp and its throwing Access-Control-Allow-Origin error and have added the header for single host on Nginx to make it work now. The problem is we have multiple environments which is trying to do the same and I have to whitelisted all