canister-auth-headers.mjs
10 lines 388 B
Raw
sha256:c2dbf04d56308f3bbf2d06e6d2eb022b8948b1e827195fe525a44e5e18d5f9c0 feat(auth): Phase B Connect cloud agent (RFC 8628) + Hermes… Human minor ⚠ breaking 13 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:93bcf8f9bd56d8c5b9339f4ec73b9ebd66571398d56262d38eedc2cfa9db9882 fix(test): align Band B landing assertion with desktop MCP … Human 13 days ago