🔧 fix: update Traefik router rule for MCP/curl access to include host condition

 feat: enable sending default PII in Sentry initialization
This commit is contained in:
2026-02-11 14:25:26 +00:00
parent b9a455d1b9
commit 62f1906276
2 changed files with 3 additions and 2 deletions

View File

@@ -20,8 +20,8 @@ services:
- traefik.enable=true
- online.testversion.code.subdomain=${PROJECT_NAME}
# Create two routers: one without auth for MCP/curl, one with auth for others
# Router 1: MCP/curl access (based on user-agent header)
- traefik.http.routers.${PROJECT_NAME}-yarnstart-mcp.rule=HeadersRegexp(`User-Agent`, `.*(Playwright|puppeteer|Headless|curl).*`)
# Router 1: MCP/curl access (based on host + user-agent header)
- traefik.http.routers.${PROJECT_NAME}-yarnstart-mcp.rule=Host(`${PROJECT_NAME}.code.testversion.online`) && HeadersRegexp(`User-Agent`, `.*(Playwright|puppeteer|Headless|curl).*`)
- traefik.http.routers.${PROJECT_NAME}-yarnstart-mcp.priority=100
- traefik.http.routers.${PROJECT_NAME}-yarnstart-mcp.service=${PROJECT_NAME}-yarnstart
# Router 2: Regular access with basic auth

View File

@@ -25,6 +25,7 @@ export const init = (dsn: string, tracingOrigins: (string | RegExp)[], environme
release: release,
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
sendDefaultPii: true,
})
console.log("Sentry initialized")
initialized = true