BlueGit

timfa 66wiki

accept more headers from robots

timfa Tim Falken · pushed by timfa

Authored 2026-02-06 · 9 months ago

Hash
4f9e72c512f85dd78903efb14e676b2b5066a3ab
Parent
8daeac6e
1 file changed +9 −0
web/dataIndex.php +9 −0
@@ -2,6 +2,15 @@
2 2 require_once __DIR__ . '/folderNode.php';
3 3
4 4 header('Content-Type: application/json; charset=utf-8');
5 header('Access-Control-Allow-Origin: *');
6 header('Access-Control-Allow-Methods: GET, HEAD, OPTIONS');
7 header('Access-Control-Allow-Headers: *');
8 header('X-Robots-Tag: all');
9
10 if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
11 http_response_code(204);
12 exit;
13 }
5 14
6 15 $dataRoot = __DIR__ . DIRECTORY_SEPARATOR . 'data';
7 16 $chaptersRoot = $dataRoot . DIRECTORY_SEPARATOR . 'chapters';
@@ -2,6 +2,15 @@
2require_once __DIR__ . '/folderNode.php';
2require_once __DIR__ . '/folderNode.php';
3
3
4header('Content-Type: application/json; charset=utf-8');
4header('Content-Type: application/json; charset=utf-8');
5header('Access-Control-Allow-Origin: *');
6header('Access-Control-Allow-Methods: GET, HEAD, OPTIONS');
7header('Access-Control-Allow-Headers: *');
8header('X-Robots-Tag: all');
9
10if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
11 http_response_code(204);
12 exit;
13}
5
14
6$dataRoot = __DIR__ . DIRECTORY_SEPARATOR . 'data';
15$dataRoot = __DIR__ . DIRECTORY_SEPARATOR . 'data';
7$chaptersRoot = $dataRoot . DIRECTORY_SEPARATOR . 'chapters';
16$chaptersRoot = $dataRoot . DIRECTORY_SEPARATOR . 'chapters';