Phase 14, part 3: Stripe's events
/billing/stripe takes Stripe's webhooks, signatures checked, each event handled once, and keeps each team's subscription up to date: checkout, its status, seats and period, failed and paid invoices, cancellation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -298,7 +298,7 @@ func (s *Server) csrf(next http.Handler) http.Handler {
|
||||
if c, err := r.Cookie(name); err == nil && len(c.Value) >= 32 {
|
||||
token = c.Value
|
||||
}
|
||||
if !safeMethod(r.Method) && r.URL.Path != "/mcp" && !strings.HasPrefix(r.URL.Path, "/api/v1/") {
|
||||
if !safeMethod(r.Method) && r.URL.Path != "/mcp" && !strings.HasPrefix(r.URL.Path, "/api/v1/") && r.URL.Path != "/billing/stripe" {
|
||||
if token == "" || !sameToken(token, sentToken(r)) {
|
||||
http.Error(w, "This form has expired: reload the page and try again.", http.StatusForbidden)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user