canister-auth-headers.mjs
sha256:baa800aedf841dbf32081aa7b2befa288ac33dfc7175ac55014c55c4d8c742f9
docs: move durable-auth freeze/evidence to local developmen…
Human
12 days ago
| 1 | /** |
| 2 | * ICP canister HTTP expects X-Gateway-Auth when the canister has a non-empty |
| 3 | * gateway_auth_secret (see hub/icp `gatewayAuthorized`). The gateway proxy |
| 4 | * always merges this; direct fetch helpers must do the same. |
| 5 | */ |
| 6 | export function canisterAuthHeaders() { |
| 7 | const secret = process.env.CANISTER_AUTH_SECRET || ''; |
| 8 | if (!secret) return {}; |
| 9 | return { 'x-gateway-auth': secret }; |
| 10 | } |
File History
1 commit
sha256:baa800aedf841dbf32081aa7b2befa288ac33dfc7175ac55014c55c4d8c742f9
docs: move durable-auth freeze/evidence to local developmen…
Human
12 days ago