From 6adf165620eaf9304c849cc873ab5cde828b491a Mon Sep 17 00:00:00 2001 From: Abdulrhmn Ghanem Date: Fri, 21 Jul 2023 00:48:24 +0300 Subject: [PATCH] squash! Hide gitea --- nginx/kitspace.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nginx/kitspace.template b/nginx/kitspace.template index 7477da1488..e22c56d07e 100644 --- a/nginx/kitspace.template +++ b/nginx/kitspace.template @@ -40,8 +40,8 @@ server { return 200 "@KITSPACE_ROBOTS_TXT"; } - # Proxy api requests to gitea, otherwise return 404. - location ^~ /api/v1/ { + # Proxy api, and raw content requests to gitea, otherwise return 404. + location ~ ^/(api|[^/]+/[^/]+/raw)/ { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -61,7 +61,7 @@ server { proxy_pass http://gitea:3000; } - location ^~ / { + location ~ / { return 404; } }