Webengineering-Filemanager/WebService/router.php

13 lines
370 B
PHP
Raw Normal View History

2021-05-23 07:54:48 +00:00
<?php
header("Access-Control-Allow-Origin: *");
if($_SERVER["REQUEST_METHOD"] == "OPTIONS"){
http_response_code(200);
header("Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE");
header("Access-Control-Allow-Headers: authorization, origin, content-type, accept, x-requested-with");
header("Access-Control-Max-Age: 3600");
} else {
include "index.php";
}
?>