Skip to content

Commit 86c2e4f

Browse files
committed
Add changeset
1 parent ac391eb commit 86c2e4f

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

.changeset/neat-llamas-shop.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'workers-observability': patch
3+
'cloudflare-casb-mcp-server': patch
4+
'cloudflare-browser-mcp-server': patch
5+
'containers-mcp': patch
6+
'workers-bindings': patch
7+
'workers-builds': patch
8+
'@repo/mcp-common': patch
9+
'dns-analytics': patch
10+
'dex-analysis': patch
11+
'cloudflare-ai-gateway-mcp-server': patch
12+
'auditlogs': patch
13+
'@repo/tools': patch
14+
'cloudflare-autorag-mcp-server': patch
15+
'graphql-mcp-server': patch
16+
'logpush': patch
17+
'cloudflare-radar-mcp-server': patch
18+
---
19+
20+
Add API token passthrough auth

packages/mcp-common/src/api-token-mode.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ export async function isApiTokenRequest(req: Request, env: RequiredEnv) {
1616
}
1717

1818
const authHeader = req.headers.get('Authorization')
19+
console.log(authHeader)
1920
if (!authHeader) return false
2021

2122
const [type, token] = authHeader.split(' ')
2223
if (type !== 'Bearer') return false
2324

24-
// Return true only if the token doesn't start with 'token:'
25-
return !token.startsWith('token:')
25+
// Return true only if the token was issued by the OAuthProvider.
26+
// A token provisioned by the OAuthProvider has 3 parts, split by colons.
27+
const codeParts = token.split(':')
28+
return codeParts.length !== 3
2629
}
2730

2831
export async function handleApiTokenMode<

packages/tools/bin/run-changeset-new

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
repo_root=$(git rev-parse --show-toplevel)
5+
cd "$repo_root"
6+
7+
# Stage changes so that changeset can see them
8+
git add .
9+
10+
changeset
11+
12+
# Make sure a changeset was created
13+
git status --porcelain | grep '.changeset/.*\.md' >/dev/null && true ||
14+
(echo "🚨 No changeset created" && exit 1)
15+
16+
new_changeset=$(ls -t .changeset/*.md | head -n 1)
17+
echo "📝 New changeset: $new_changeset"
18+
git add "$new_changeset"

0 commit comments

Comments
 (0)