# Deploy Result — OAuth Wildcard redirect_uris **Date:** 2026-06-17 **Commit deployed:** `85cb2db` (`fix(oauth): support wildcard redirect_uris`) **Service:** hermes-mcp **Status:** ✅ Committed, pushed, and deployed ---- ## Changes ### `src/oauth.ts` Replaced the redirect_uri exact-match validation in `isValidRedirectUri` with wildcard support: ```ts export function isValidRedirectUri(uri: string, registeredUris: string[]): boolean { return registeredUris.some(registered => { if (registered === uri) return true; if (registered.includes('*')) { const escaped = registered.replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '[^/]+'); return new RegExp('^' + escaped + '$').test(uri); } return false; }); } ``` This allows registered URIs like `https://*.example.com/callback` or `https://chat.openai.com/aip/*/oauth/callback`. ### `src/oauth.test.ts` Updated tests to match the new wildcard behavior: - Exact match still works - `http://localhost:*` matches localhost ports - Wildcard subdomain patterns now match - ChatGPT GPT callback wildcard matches - Unrelated domains are still rejected ---- ## Commit & push ```bash git add src/oauth.ts src/oauth.test.ts git commit -m "fix(oauth): support wildcard redirect_uris" git push origin main ``` Pushed `6ca0ca6..85cb2db` to `https://git.fetcherpay.com/garfield/hermes-mcp.git`. ---- ## Deploy ```bash cd ~/hermes-mcp docker build -t localhost:32000/hermes-mcp:85cb2db . docker push localhost:32000/hermes-mcp:85cb2db # updated hermes-k8s.yaml image → localhost:32000/hermes-mcp:85cb2db (not committed) microk8s kubectl apply -f hermes-k8s.yaml microk8s kubectl rollout status deployment/hermes-mcp -n fetcherpay ``` ## Pod status ``` NAME READY STATUS RESTARTS AGE IP hermes-mcp-858569b7cc-lzvb9 1/1 Running 0 ... 104.190.60.129 ``` ## Verification - Unit tests: `npx vitest run src/oauth.test.ts` → **28 passed** ✅ - Deployed image contains the new `isValidRedirectUri` implementation ✅ - `hermes.squaremcp.com/health` returns 200 ✅ ## Notes - `hermes-k8s.yaml` image tag was updated locally but **not committed**. - `microk8s ctr image import -` was not used; `docker push localhost:32000/...` registry path works reliably on this host.