Skip to content

Instantly share code, notes, and snippets.

View AlvinAYYE's full-sized avatar

Yang Bo-Yu AlvinAYYE

  • Republic of China
  • 02:08 (UTC +08:00)
  • Facebook AlvinAYTW
View GitHub Profile
@avtaniket
avtaniket / cors.php
Last active June 5, 2025 14:01
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');