Skip to content

Commit

Permalink
Hide gitea
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulrhmnGhanem committed Feb 16, 2023
1 parent c086ab3 commit 19d2cfa
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 @@ -35,7 +35,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 @@ -54,6 +55,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 19d2cfa

Please sign in to comment.