From 145e2118b3fc77c533addcb48c8cf4797b11cf86 Mon Sep 17 00:00:00 2001 From: bolbol Date: Tue, 28 Jul 2026 12:25:47 +0000 Subject: [PATCH] add common/baserow-oauth-stub/nginx.conf (fix connecteur Claude.ai Baserow MCP) --- common/baserow-oauth-stub/nginx.conf | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 common/baserow-oauth-stub/nginx.conf diff --git a/common/baserow-oauth-stub/nginx.conf b/common/baserow-oauth-stub/nginx.conf new file mode 100644 index 0000000..accc92a --- /dev/null +++ b/common/baserow-oauth-stub/nginx.conf @@ -0,0 +1,52 @@ +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +} + +server { + listen 80; + server_name baserow.bolbol.tn; + + # --- Endpoints OAuth statiques (decouverte) --- + location = /.well-known/oauth-authorization-server { + default_type application/json; + alias /etc/nginx/well-known/oauth-authorization-server.json; + } + + location ~ ^/\.well-known/oauth-protected-resource(/.*)?$ { + default_type application/json; + alias /etc/nginx/well-known/oauth-protected-resource.json; + } + + # --- Endpoints OAuth dynamiques (register/authorize/token) --- + location = /register { + proxy_pass http://oauth-app:8080/register; + proxy_set_header Host $host; + } + + location = /authorize { + proxy_pass http://oauth-app:8080/authorize; + proxy_set_header Host $host; + } + + location = /token { + proxy_pass http://oauth-app:8080/token; + proxy_set_header Host $host; + } + + # --- Tout le reste : Baserow inchange (app web, API, websocket, MCP SSE) --- + location / { + proxy_pass http://baserow:80; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_buffering off; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + chunked_transfer_encoding on; + } +}