1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

[fix] follow nginx conf order for path traversal

This commit is contained in:
tituspijean 2020-05-17 14:55:51 +02:00
parent c561d38270
commit 5a8604ae8d

View file

@ -1,11 +1,13 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { location __PATH__/ {
# Path to source
alias __FINALPATH__/public/ ;
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
alias __FINALPATH__/public/;
index index.php; index index.php;
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 ) # Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )