more ucp
This commit is contained in:
@@ -194,8 +194,12 @@ func main() {
|
||||
checkoutUCP = ucp.WithSigning(checkoutUCP, signer)
|
||||
log.Print("ucp signing enabled")
|
||||
}
|
||||
mux.Handle("/ucp/v1/checkout-sessions", checkoutUCP)
|
||||
mux.Handle("/ucp/v1/checkout-sessions/", checkoutUCP)
|
||||
// StripPrefix is required because the sub-mux (CheckoutHandler) registers
|
||||
// routes like "GET /{id}" which expect a relative path; Go's ServeMux
|
||||
// passes the full request path without stripping the prefix.
|
||||
// Only the subtree pattern is registered (see comment in cmd/cart/main.go
|
||||
// for why the exact-match pattern is omitted).
|
||||
mux.Handle("/ucp/v1/checkout-sessions/", http.StripPrefix("/ucp/v1/checkout-sessions", checkoutUCP))
|
||||
|
||||
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
grainCount, capacity := pool.LocalUsage()
|
||||
|
||||
Reference in New Issue
Block a user