Question #6894   Submitted by Answiki on 10/13/2022 at 07:26:45 AM UTC

How disable CORS blocking in PHP?

Answer   Submitted by Answiki on 10/13/2022 at 07:26:06 AM UTC

In PHP, the following line enable cross-origin ressource sharing:

header('Access-Control-Allow-Origin: *');

You can specify to a single specific domain:

header('Access-Control-Allow-Origin: https://url-example.com');



3 events in history
Question by Answiki 10/13/2022 at 07:26:45 AM
How disable CORS blocking in PHP?
Answer by Answiki on 10/13/2022 at 07:26:06 AM

In PHP, the following line enable cross-origin ressource sharing:

header('Access-Control-Allow-Origin: *');

You can specify to a single specific domain:

header('Access-Control-Allow-Origin: https://url-example.com');



Question by Answiki 10/13/2022 at 07:21:38 AM
How to bypass Access-Control-Allow-Origin in PHP?
# ID Query URL Count

Icons proudly provided by Friconix.