Fixed CORS issues.

This commit is contained in:
flash 2024-01-28 15:55:24 +00:00
parent 8b2ddfb96d
commit d1b154303a

View file

@ -26,6 +26,7 @@ define('FTM_FILE_HASH_MAP', [
]);
header('X-Powered-By: Futami');
header('Access-Control-Allow-Origin: *');
$reqMethod = (string)filter_input(INPUT_SERVER, 'REQUEST_METHOD');
if($reqMethod === 'OPTIONS') {
@ -95,7 +96,6 @@ if($reqPath === '/' || $reqPath === '/index.html' || $reqPath === '/index.php')
}
header('Cache-Control: max-age=86400, must-revalidate');
header('Access-Control-Allow-Origin: *');
if($reqPath === '/common.json') {
etag_file('common', FTM_COMMON_CONFIG);