mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-25 05:37:56 -05:00
* Implement support for HTTP 429 Too Many Requests Will obey the corresponding HTTP `Retry-After` header at domain level. * Implement 503 Service Unavailable * Sanitize Retry-After * Reduce default value when Retry-After is absent And make configuration parameter * Retry-After also for favicons
37 lines
523 B
PHP
Executable File
37 lines
523 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
declare(strict_types=1);
|
|
require(__DIR__ . '/_cli.php');
|
|
|
|
$dirs = [
|
|
'/',
|
|
'/cache',
|
|
'/extensions-data',
|
|
'/favicons',
|
|
'/fever',
|
|
'/PubSubHubbub',
|
|
'/PubSubHubbub/feeds',
|
|
'/PubSubHubbub/keys',
|
|
'/Retry-After',
|
|
'/tokens',
|
|
'/users',
|
|
'/users/_',
|
|
];
|
|
|
|
$ok = true;
|
|
|
|
foreach ($dirs as $dir) {
|
|
@mkdir(DATA_PATH . $dir, 0770, true);
|
|
$ok &= touch(DATA_PATH . $dir . '/index.html');
|
|
}
|
|
|
|
file_put_contents(DATA_PATH . '/.htaccess', <<<'EOF'
|
|
Require all denied
|
|
|
|
EOF
|
|
);
|
|
|
|
accessRights();
|
|
|
|
done((bool)$ok);
|