Skip to content

Instantly share code, notes, and snippets.

View latiza's full-sized avatar

Zita Ruzsinszki latiza

View GitHub Profile
@avtaniket
avtaniket / cors.php
Last active February 17, 2025 13:47
Handle CORS in PHP
<?php
/* Handle CORS */
// Specify domains from which requests are allowed
header('Access-Control-Allow-Origin: *');
// Specify which request methods are allowed
header('Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS');