codeant-ai-for-open-source[bot] commented on PR #35021:
URL: https://github.com/apache/superset/pull/35021#issuecomment-4008648513
## **Sequence Diagram**
Shows the new flow where alert/report email links are rewritten to a
redirect endpoint; the backend either redirects internal links immediately or
serves a frontend warning page for external links, and the frontend
confirms/trusts then navigates to the target.
```mermaid
sequenceDiagram
participant AlertsService
participant EmailClient as "User (Email Client)"
participant RedirectEndpoint as "Backend /redirect"
participant RedirectUI as "Frontend RedirectWarning"
AlertsService->>EmailClient: Send email with links rewritten to
/redirect/?url=TARGET
EmailClient->>RedirectEndpoint: User clicks link (/redirect/?url=TARGET)
RedirectEndpoint->>RedirectEndpoint: Validate URL & scheme
alt Internal or same-host
RedirectEndpoint-->>EmailClient: 302 redirect to TARGET
else External
RedirectEndpoint-->>RedirectUI: Render warning page with TARGET
RedirectUI-->>EmailClient: Show confirmation UI
EmailClient->>RedirectUI: User clicks Continue (optionally trust)
RedirectUI->>EmailClient: Navigate to TARGET (and optionally save
trusted URL)
end
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]