Spaces:
Running
Running
File size: 910 Bytes
472efd1 e471cfa 472efd1 e471cfa 472efd1 e471cfa 472efd1 e471cfa 472efd1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | worker_processes 1;
events {
worker_connections 1024;
}
http {
map $http_referer $openapi_backend {
default "";
~*/auth/ http://127.0.0.1:8001;
~*/task/ http://127.0.0.1:8002;
}
server {
listen 7860;
# Root entry (HF Space landing)
location = / {
return 302 /auth/docs;
}
# Auth service
location /auth/ {
proxy_pass http://127.0.0.1:8001/;
proxy_set_header Host $host;
}
# Task service
location /task/ {
proxy_pass http://127.0.0.1:8002/;
proxy_set_header Host $host;
}
# Swagger OpenAPI fix
location = /openapi.json {
proxy_pass $openapi_backend/openapi.json;
}
# Favicon
location = /favicon.ico {
return 204;
access_log off;
}
}
}
|