Function: serverCartSecretMiddleware()
serverCartSecretMiddleware(
credentials,isCartScoped?):Middleware
Server cart-secret middleware. Takes the credentials already read from the
request cookies (readCartCredentials) — prepend it to a server client so
SSR / edge cart reads carry the secret. As with the client variant, the
header is sent only for cart-scoped operations (isCartScoped, default
isCartScopedOperation). No header is sent when credentials are null or
carry no secret.
Parameters
credentials
CartCredentials | null
isCartScoped?
(operationName) => boolean