Control Web Panel
WebPanel => CentOS 7 Problems => Topic started by: Marko 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
Header set Access-Control-Allow-Origin "*"
In nginx vhosts config
add_header 'Access-Control-Allow-Origin' '*';
In php script
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?
-
you need to add cors for nginx too. Create a custom template for it.
-
Already added but problem was line in apache config, after removing all working fine. So header added in nginx and php only.