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

View File

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