diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-01-31 06:11:00 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-01-31 20:45:40 +0300 |
commit | c0dc531ebefd8912819f3b6c8bda1fed3c7e750c (patch) | |
tree | 2c75aa9df182260aef09faf4befd81a4c2b9c5e2 /htdocs/js.php | |
parent | 48d688cdf7f9eae1bf11b8a6f0e5b98687c604cb (diff) |
make it simple, but not simpler
Diffstat (limited to 'htdocs/js.php')
-rw-r--r-- | htdocs/js.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/htdocs/js.php b/htdocs/js.php index c9939fe..57d847f 100644 --- a/htdocs/js.php +++ b/htdocs/js.php @@ -1,11 +1,10 @@ <?php require __DIR__.'/../init.php'; -global $config; $name = $_REQUEST['name'] ?? ''; -if (!$config['is_dev'] || !$name || !is_dir($path = ROOT.'/htdocs/js/'.$name)) { +if (!is_dev() || !$name || !is_dir($path = APP_ROOT.'/htdocs/js/'.$name)) { http_response_code(403); exit; } |