🎨 Update frontend
Browse files- frontend/nginx.conf +8 -1
frontend/nginx.conf
CHANGED
|
@@ -11,7 +11,7 @@ server {
|
|
| 11 |
|
| 12 |
# Proxy API requests to Spring Boot backend running on port 8080
|
| 13 |
location /api/ {
|
| 14 |
-
proxy_pass http://
|
| 15 |
proxy_set_header Host $host;
|
| 16 |
proxy_set_header X-Real-IP $remote_addr;
|
| 17 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
@@ -28,6 +28,13 @@ server {
|
|
| 28 |
proxy_read_timeout 60s;
|
| 29 |
}
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
# Cache static assets
|
| 32 |
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
| 33 |
expires 1y;
|
|
|
|
| 11 |
|
| 12 |
# Proxy API requests to Spring Boot backend running on port 8080
|
| 13 |
location /api/ {
|
| 14 |
+
proxy_pass http://localhost:8080/;
|
| 15 |
proxy_set_header Host $host;
|
| 16 |
proxy_set_header X-Real-IP $remote_addr;
|
| 17 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
| 28 |
proxy_read_timeout 60s;
|
| 29 |
}
|
| 30 |
|
| 31 |
+
# Health check endpoint for HF Spaces
|
| 32 |
+
location /health {
|
| 33 |
+
access_log off;
|
| 34 |
+
return 200 "healthy\n";
|
| 35 |
+
add_header Content-Type text/plain;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
# Cache static assets
|
| 39 |
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
| 40 |
expires 1y;
|