New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

CORS Missing Allow Origin

Started by Marko, December 24, 2020, 12:12:17 AM

Previous topic - Next topic

Marko

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?

Sandeep

you need to add cors for nginx too. Create a custom template for it.

Marko

Already added but problem was line in apache config, after removing all working fine. So header added in nginx and php only.