PiTiNiNjA
New Pleskian
Hello!
I'm having trouble trying to enable CORS on my PHP API.
If I put header('Access-Control-Allow-Origin: *'); in my PHP code, it has no effect.
But if I put Header set Access-Control-Allow-Origin * in the Plesk Apache configuration, then it works.
How can I let PHP manage the CORS headers?
Regards
I'm having trouble trying to enable CORS on my PHP API.
If I put header('Access-Control-Allow-Origin: *'); in my PHP code, it has no effect.
But if I put Header set Access-Control-Allow-Origin * in the Plesk Apache configuration, then it works.
How can I let PHP manage the CORS headers?
Regards
Last edited: