Skip to content

Commit

Permalink
Hide gitea
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulrhmnGhanem committed Jul 17, 2023
1 parent 8175a06 commit 5305608
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nginx/kitspace.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ server {
return 200 "@KITSPACE_ROBOTS_TXT";
}

location ^~ / {
# Proxy api requests to gitea, otherwise redirect to the apex domain.
location ^~ /api/v1/ {
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;
Expand All @@ -59,6 +60,11 @@ server {
}
proxy_pass http://gitea:3000;
}

location ^~ / {
# 307 just in case we end up exposing gitea again to avoid caching issues.
return 307 @KITSPACE_URL;
}
}

server {
Expand Down

0 comments on commit 5305608

Please sign in to comment.