Uncategorized

How to enable CORS

Cors means Cross-origin resource sharing which should be enable to establish the communication between a mobile app and a website


<?php 

header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST");
header("Access-Control-Allow-Headers: Content-Type");

?>

Leave a Reply

Your email address will not be published. Required fields are marked *