-
-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
646 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$HTTP["url"] =~ "^/tasmoadmin($|/)" { | ||
# Deny direct access to .htaccess and data directory | ||
$HTTP["url"] =~ "^/tasmoadmin/(\.|data)" { | ||
# Allow direct access to firmwares | ||
$HTTP["url"] !~ "^/tasmoadmin/data/firmwares" { | ||
url.access-deny = ("") | ||
} | ||
} | ||
|
||
# TasmoAdmin URL rewrites | ||
else $HTTP["url"] !~ "^/tasmoadmin/index\.php($|/)" { | ||
url.rewrite-if-not-file = ("^/tasmoadmin/(.*)$" => "/tasmoadmin/index.php?$1") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Location: /etc/nginx/sites-dietpi/dietpi-tasmoadmin.conf | ||
# Based on: https://github.com/TasmoAdmin/TasmoAdmin/blob/master/.docker/rootfs/etc/nginx/nginx.conf | ||
location ^~ /tasmoadmin { | ||
# Allow direct access to firmwares | ||
location ^~ /tasmoadmin/data/firmwares { | ||
add_header Access-Control-Allow-Origin *; | ||
} | ||
|
||
# Deny direct access to .htaccess and data directory | ||
location ~ ^/tasmoadmin/(?:\.|data) { | ||
deny all; | ||
} | ||
|
||
location ~ ^/tasmoadmin/index\.php(/|$) { | ||
fastcgi_pass php; | ||
fastcgi_read_timeout 900; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | ||
fastcgi_param DOCUMENT_ROOT $realpath_root; | ||
internal; | ||
} | ||
|
||
location ~ \.(css|js|gif||jpe?g|png|json|cache\.json)$ { | ||
} | ||
|
||
location /tasmoadmin { | ||
try_files $uri $uri/ /tasmoadmin/index.php$is_args$args; | ||
} | ||
} |
Oops, something went wrong.