diff options
Diffstat (limited to 'deploy')
| -rw-r--r-- | deploy/food.tomflux.xyz.nginx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/deploy/food.tomflux.xyz.nginx b/deploy/food.tomflux.xyz.nginx index 87172cc..400f7f1 100644 --- a/deploy/food.tomflux.xyz.nginx +++ b/deploy/food.tomflux.xyz.nginx @@ -33,10 +33,11 @@ server { } # --- MCP server (claude.ai cooking-mode connector) --- - # Trailing slashes on both sides strip the secret prefix, so the FastMCP - # service (serving at "/") sees clean paths. - location /mcp/REPLACE_WITH_LONG_SECRET/ { - proxy_pass http://127.0.0.1:8765/; + # Regex so it matches with OR without a trailing slash — claude.ai stores + # the connector URL without one. Whatever follows the secret is normalised + # onto the FastMCP root (the service serves at "/"). + location ~ ^/mcp/REPLACE_WITH_LONG_SECRET/?(?<mcp_rest>.*)$ { + proxy_pass http://127.0.0.1:8765/$mcp_rest$is_args$args; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; |
