feat(webhooks): use WEBHOOK_CALLBACK_BASE_URL as server-side default for webhook management#5
Open
ada-evorada wants to merge 3 commits intoclaude/cranky-johnsonfrom
Open
Conversation
… for webhook management
…for webhook management
…bilities Runs npm audit fix to update axios 1.13.5→1.15.0 (critical SSRF), hono 4.12.9→4.12.12, and @hono/node-server 1.19.12→1.19.13 (moderate) so the CI npm audit --omit=dev --audit-level=high check passes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
CI Failures ResolvedFixes Applied
Verification
|
suda
approved these changes
Apr 9, 2026
Member
suda
left a comment
There was a problem hiding this comment.
Summary
Clean, well-structured implementation. The server-side fallback chain (explicit param -> WEBHOOK_CALLBACK_BASE_URL -> BAD_REQUEST) is consistent across create, delete, and list. Frontend gracefully handles the loading state by falling back to API_URL then window.location.origin. All 7361 unit tests pass and CI is green.
Minor Observation
tests/unit/api/routers/system.test.ts: beforeEach is imported from vitest but never used in the file. No functional impact, just a stale import.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
systemtRPC router — exposesWEBHOOK_CALLBACK_BASE_URLasrouterPublicUrlvia asystem.getPublicUrlquery, giving CLI and frontend a single source of truth for the server-configured public URLcreateanddeleteprocedures now acceptcallbackBaseUrlas optional, falling back toWEBHOOK_CALLBACK_BASE_URLenv var; throwsBAD_REQUESTif neither is providedsystem.getPublicUrland use the server-provided URL instead of deriving from the browser origincascade webhooks create/deletefetch server public URL viasystem.getPublicUrlwhen--callback-urlis not provided;cascade webhooks listuses server URL for Sentry URL displayCLAUDE.mdupdated to clarify the dual purpose ofWEBHOOK_CALLBACK_BASE_URLand its requirement when deployed behind NAT/reverse proxycredential-scoping.test.tsfixed to properly delete env vars instead of setting toundefinedFixes the issue where webhook creation/deletion would use the local internal URL instead of the public URL when CASCADE is deployed behind NAT/reverse proxy.
Card: https://trello.com/c/c2DxzsJC/14-the-scm-and-pm-integrations-are-configuring-webhooks-but-they-are-using-the-local-url-of-cascade-which-wont-work-if-its-behind-n
Test plan
system.getPublicUrl— returns env var when set,nullwhen not set, throwsUNAUTHORIZEDfor unauthenticated requestswebhooks.createandwebhooks.deletewith nocallbackBaseUrl— uses env var when set, throwsBAD_REQUESTwhen neither is providedsystem.getPublicUrland verify new fallback behaviorWEBHOOK_CALLBACK_BASE_URL=https://cascade.example.comand verifycascade webhooks create <project-id>(without--callback-url) registers webhooks pointing to the public URLWEBHOOK_CALLBACK_BASE_URLis set🤖 Generated with Claude Code