Author Topic: CORS Missing Allow Origin  (Read 5779 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CORS Missing Allow Origin
« on: December 24, 2020, 12:12:17 AM »
Hello
I have using Nginx & Varnish & Apache but can't find solution to fix CORS problem.
I have add in apache vhosts
Code: [Select]
Header set Access-Control-Allow-Origin "*"
In nginx vhosts config
Code: [Select]
add_header 'Access-Control-Allow-Origin' '*';
In php script

Code: [Select]
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Credentials: true"

What i'm missing, where can be problem and why i have "CORS Missing Allow Origin" error constantly?

Offline
*****
Re: CORS Missing Allow Origin
« Reply #1 on: December 24, 2020, 05:55:24 AM »
you need to add cors for nginx too. Create a custom template for it.

Offline
*
Re: CORS Missing Allow Origin
« Reply #2 on: December 24, 2020, 02:22:01 PM »
Already added but problem was line in apache config, after removing all working fine. So header added in nginx and php only.