Skip to content

Commit cd802c6

Browse files
committed
Revert to working nginx panel configuration
- Back to proven rewrite + break pattern that was working - Keep the added proxy headers for proper forwarding - Remove the trailing slash approach that broke functionality Working pattern: - rewrite ^/panel/(.*)$ / break strips /panel/ prefix - proxy_pass http://127.0.0.1:9002 (no trailing slash) - Restores https://afrihornet.ngrok.io/panel/ functionality
1 parent b12a649 commit cd802c6

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,10 @@ server {
282282
proxy_pass http://127.0.0.1:8000;
283283
}
284284
285-
# Panel access - Admin dashboard (integrated server handles React Router)
286-
location /panel {
287-
return 301 /panel/;
288-
}
289-
285+
# Panel access - Admin dashboard
290286
location /panel/ {
291-
proxy_pass http://127.0.0.1:9002/;
287+
rewrite ^/panel/(.*)$ /$1 break;
288+
proxy_pass http://127.0.0.1:9002;
292289
proxy_set_header Host $host;
293290
proxy_set_header X-Real-IP $remote_addr;
294291
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

fixed_nginx_config.conf

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,10 @@ server {
4343
proxy_pass http://transcribe_api;
4444
}
4545

46-
# Panel access - Admin dashboard (FIXED: proper trailing slash and headers)
47-
location /panel {
48-
return 301 /panel/;
49-
}
50-
46+
# Panel access - Admin dashboard (back to working rewrite pattern)
5147
location /panel/ {
52-
proxy_pass http://panel_service/;
48+
rewrite ^/panel/(.*)$ /$1 break;
49+
proxy_pass http://panel_service;
5350
proxy_set_header Host $host;
5451
proxy_set_header X-Real-IP $remote_addr;
5552
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)