diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-10 18:21:51 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-10 18:21:51 +0500 |
| commit | 0891b1fb605a0244a3f034ebdd528b4b57fa35f2 (patch) | |
| tree | 3af3ebf6be1f641b0b1fde2ebc474846673d0a11 | |
| parent | 78ccc7e7db5fca5a1ff9bb63ef64b015f3afb1f3 (diff) | |
upd: removed INSTANCE_STATIC_FOLDER constant
| -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 |
