Browse Source

Fix gitea ssl (#4012)

Andrea Sessa 2 years ago
parent
commit
5022569b36

+ 3 - 2
install/deb/templates/web/nginx/php-fpm/gitea.stpl

@@ -24,8 +24,9 @@ server {
 
 	include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
 
-	location ~ /.well-known {
-		allow all;
+	location ~ /\.(?!well-known\/) {
+		deny all;
+		return 404;
 	}
 
 	location / {

+ 3 - 2
install/deb/templates/web/nginx/php-fpm/gitea.tpl

@@ -15,8 +15,9 @@ server {
 
 	include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
 
-	location ~ /.well-known {
-		allow all;
+	location ~ /\.(?!well-known\/) {
+		deny all;
+		return 404;
 	}
 
 	location / {