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

Fix alias_traversal

See alias_traversal errors in https://ci-apps.yunohost.org/jenkins/job/flarum%20(Community)/4/consoleFull
This commit is contained in:
Titus PiJean 2018-03-16 17:23:14 +01:00 committed by GitHub
parent a6ac2c983a
commit a023477254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
location ^~ __PATH__ {
location ^~ __PATH__/ {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
@ -10,10 +10,10 @@ location ^~ __PATH__ {
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
location __LOCATION_HACK__/ { try_files $uri $uri/ __PATH_HACK__/index.php?$query_string; }
location __LOCATION_HACK__/api { try_files $uri $uri/ __PATH_HACK__/api.php?$query_string; }
location __LOCATION_HACK__/admin { try_files $uri $uri/ __PATH_HACK__/admin.php?$query_string; }
location __LOCATION_HACK__/api/ { try_files $uri $uri/ __PATH_HACK__/api.php?$query_string; }
location __LOCATION_HACK__/admin/ { try_files $uri $uri/ __PATH_HACK__/admin.php?$query_string; }
location __LOCATION_HACK__/flarum {
location __LOCATION_HACK__/flarum/ {
deny all;
return 404;
}