Files
aios/deploy/nginx/aios-agent-task-api.conf.example
T

47 lines
1.6 KiB
Plaintext

# External agent ingress. TLS termination is assumed on the enclosing server.
# Control endpoints (/v1/agents/register, POST /v1/tasks, verify/cancel/events)
# are intentionally NOT exposed here; the AIOS control plane reaches them on
# loopback with its server-side credential.
location = /agent-tasks/health {
rewrite ^/agent-tasks/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:18940;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /agent-tasks/v1/tasks/poll {
limit_except POST { deny all; }
rewrite ^/agent-tasks/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:18940;
proxy_http_version 1.1;
proxy_set_header Authorization $http_authorization;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 1m;
proxy_read_timeout 35s;
}
location ~ ^/agent-tasks/v1/tasks/[A-Za-z0-9][A-Za-z0-9._:-]{2,179}/(claim|heartbeat|result)$ {
limit_except POST { deny all; }
rewrite ^/agent-tasks/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:18940;
proxy_http_version 1.1;
proxy_set_header Authorization $http_authorization;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 1m;
proxy_read_timeout 35s;
}
location ~ ^/agent-tasks/v1/tasks/[A-Za-z0-9][A-Za-z0-9._:-]{2,179}$ {
limit_except GET { deny all; }
rewrite ^/agent-tasks/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:18940;
proxy_http_version 1.1;
proxy_set_header Authorization $http_authorization;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 35s;
}