diff --git a/nginx/locations.conf b/nginx/locations.conf index 5bd4a9b..cadf7da 100644 --- a/nginx/locations.conf +++ b/nginx/locations.conf @@ -125,8 +125,8 @@ location /openrouter/ { return 403 '{"error":"ip_not_allowed"}'; } - set $openrouter_upstream https://openrouter.ai/api/v1; - rewrite ^/openrouter/(.*) /$1 break; + set $openrouter_upstream https://openrouter.ai; + rewrite ^/openrouter/(.*) /api/v1/$1 break; proxy_pass $openrouter_upstream; proxy_ssl_server_name on;