-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathwrangler.toml
More file actions
48 lines (43 loc) · 2.46 KB
/
Copy pathwrangler.toml
File metadata and controls
48 lines (43 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name = "plausible-mcp"
# Sentry Internal. Pinned so a deploy can't land in another account by accident.
account_id = "20d94f53c7cab0b469521b703ff1923c"
main = "src/worker.ts"
compatibility_date = "2025-01-01"
# nodejs_compat_v2: Node built-ins for the SDK. global_fetch_strictly_public: hardens
# the JWKS fetch — fetch() can only reach public addresses, blocking SSRF.
compatibility_flags = ["nodejs_compat_v2", "global_fetch_strictly_public"]
routes = [
{ pattern = "plausible-mcp.sentry.dev", custom_domain = true }
]
[vars]
# Email domain(s) allowed to sign in to /internal (comma-separated, "@" optional).
# Enforced in code in ADDITION to the upstream Access policy. Self-hosting? Set your own.
ALLOWED_EMAIL_DOMAIN = "sentry.io"
# Access service-token client IDs allowed on /internal without a user identity
# (comma-separated). Not secrets — identifiers; the matching Access policy still
# requires the token's secret. Currently: the "junior-plausible-mcp" token.
ALLOWED_SERVICE_TOKEN_IDS = "f2fb6d108dd50696e67d022c4eaa2c5f.access"
# Hostnames accepted by the MCP endpoints (port-agnostic). Keep localhost for wrangler dev.
MCP_ALLOWED_HOSTNAMES = "plausible-mcp.sentry.dev,localhost,127.0.0.1"
# Browser origins allowed to call /internal. Non-browser clients send no Origin header.
MCP_ALLOWED_ORIGIN_HOSTNAMES = "claude.ai,localhost,127.0.0.1"
# Cloudflare Access team domain — verifies the Cf-Access-Jwt-Assertion JWKS + issuer.
# Not a secret (public JWKS URL); must match the team the Access app lives in. No slash.
CF_ACCESS_TEAM_DOMAIN = "https://sentry-internal.cloudflareaccess.com"
# The Access application's Application Audience (AUD) tag — checked against the token
# `aud`. Not a secret (an app identifier, not a credential).
CF_ACCESS_AUD = "163ce3b13ebe967295ffdf932b5699a2202de3a650684c87f61d5076eb6735c4"
[dev]
port = 8787
# With Managed OAuth, Cloudflare Access runs the OAuth server; the Worker only verifies
# the assertion Access injects, so no OAuth client id/secret, cookie key, or KV is needed.
# The one true secret is the shared Plausible key — set it out-of-band, not in this file:
# wrangler secret put PLAUSIBLE_API_KEY
# Optional: the Worker's own Sentry telemetry. Deliberately a secret rather than a var so
# forks of this repo don't report into someone else's Sentry project. Unset = SDK disabled.
# wrangler secret put SENTRY_DSN
[[unsafe.bindings]]
name = "RATE_LIMITER"
type = "ratelimit"
namespace_id = "1001"
simple = { limit = 60, period = 60 }