more ucp
This commit is contained in:
+6
-2
@@ -162,8 +162,12 @@ func main() {
|
||||
orderUCP = ucp.WithSigning(orderUCP, signer)
|
||||
logger.Info("ucp signing enabled")
|
||||
}
|
||||
mux.Handle("/ucp/v1/orders", orderUCP)
|
||||
mux.Handle("/ucp/v1/orders/", orderUCP)
|
||||
// StripPrefix is required because the sub-mux (OrderHandler) 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/orders/", http.StripPrefix("/ucp/v1/orders", orderUCP))
|
||||
|
||||
// Saga / flow admin (backoffice editor).
|
||||
mux.HandleFunc("GET /sagas/capabilities", s.handleCapabilities)
|
||||
|
||||
Reference in New Issue
Block a user