Skip to content

Commit

Permalink
Update next API routing
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Aug 1, 2024
1 parent c66aed2 commit 32071d5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions sites-enabled/next.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@ server {
listen 80;
server_name next.akatsuki.gg;

# Redirect /api/ to akatsuki-api
location /api/ {
proxy_set_header X-Real-IP $http_CF_Connecting_IP;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;

proxy_pass http://akatsuki_api;
}

location /api/v1/profile-history {
proxy_set_header X-Real-IP $http_CF_Connecting_IP;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://profile_history_service;
}

location / {
proxy_set_header X-Real-IP $http_CF_Connecting_IP;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down

0 comments on commit 32071d5

Please sign in to comment.