canister-auth-headers.mjs
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
10 hours 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:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
10 hours ago