diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | 404.php | 2 | ||||
| -rw-r--r-- | README.md | 5 | ||||
| -rw-r--r-- | lib/config.php | 2 |
4 files changed, 1 insertions, 9 deletions
@@ -2,5 +2,4 @@ userdata/ *.db config.json -custom_static/ captcha/
\ No newline at end of file @@ -31,7 +31,7 @@ $reason = str_safe($_GET["error_reason"] ?? "Not found", 200); <section style="position: absolute; right: 6px; bottom: 6px;"> <img src="/static/img/404/<?php - $files = scandir(INSTANCE_STATIC_FOLDER . "/img/404"); + $files = scandir("{$_SERVER['DOCUMENT_ROOT']}/static/img/404"); array_splice($files, 0, 2); echo $files[random_int(0, count($files) - 1)]; ?>" alt=""></img> @@ -55,11 +55,6 @@ server { root /www/tinyemotesinstance/public; index index.php; - location ~ ^/static/?(.*)$ { - root /www/tinyemotesinstance/public; - try_files /custom_static/$1 /static/$1 =404; - } - location / { try_files $uri $uri/ /index.php?$query_string; } diff --git a/lib/config.php b/lib/config.php index fac6e02..c4fc5d8 100644 --- a/lib/config.php +++ b/lib/config.php @@ -111,7 +111,5 @@ $cfg['rating']['names'] = $n; define('CONFIG', $cfg); -define("INSTANCE_STATIC_FOLDER", "static"); // Static folder. Used only in /404.php. - // FOR DEVELOPERS define("CLIENT_REQUIRES_JSON", isset($_SERVER["HTTP_ACCEPT"]) && $_SERVER["HTTP_ACCEPT"] == "application/json");
\ No newline at end of file |
