From f3813ddf1294be387e55a5344dc569c4bc2d972d Mon Sep 17 00:00:00 2001 From: Flegma Date: Tue, 17 Nov 2026 16:40:20 +0100 Subject: [PATCH 1/3] Run the Hasura auth hook in POST mode POST mode hands the api the client's Origin and Content-Type, so it can refuse a session cookie sent cross-origin to /v1/graphql. Needs the api POST /hasura hook (5stackgg/api#1393). --- base/hasura/deployment.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/base/hasura/deployment.yaml b/base/hasura/deployment.yaml index 4682945..24fd3e8 100644 --- a/base/hasura/deployment.yaml +++ b/base/hasura/deployment.yaml @@ -126,6 +126,11 @@ spec: value: "true" - name: HASURA_GRAPHQL_AUTH_HOOK value: "http://api:5585/hasura" + # POST mode passes the client's Origin and Content-Type to the hook. + - name: HASURA_GRAPHQL_AUTH_HOOK_MODE + value: "POST" + - name: HASURA_GRAPHQL_AUTH_HOOK_SEND_REQUEST_BODY + value: "false" - name: HASURA_GRAPHQL_EVENT_HOOK value: "http://api:5585/hasura/events" - name: HASURA_GRAPHQL_ACTIONS_HOOK From 1e2ad472d4b9c76186588c719018a13d325effc3 Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Tue, 17 Nov 2026 20:34:25 -0500 Subject: [PATCH 2/3] Roll the api with the Hasura POST hook switch --- base/api/deployment.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/api/deployment.yaml b/base/api/deployment.yaml index 3280fdd..1fd8d83 100644 --- a/base/api/deployment.yaml +++ b/base/api/deployment.yaml @@ -19,6 +19,10 @@ spec: metadata: labels: app: api + # A change here rolls the api onto the current image, so it serves the + # POST /hasura hook before Hasura switches to POST mode. + annotations: + 5stack.gg/hasura-hook-mode: post spec: serviceAccountName: server-creator dnsConfig: From 2eebd09e96bf7fd4da788c80235e4cfb3df003eb Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Tue, 17 Nov 2026 20:34:41 -0500 Subject: [PATCH 3/3] Word the api rollout note --- base/api/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/api/deployment.yaml b/base/api/deployment.yaml index 1fd8d83..f8485ee 100644 --- a/base/api/deployment.yaml +++ b/base/api/deployment.yaml @@ -19,8 +19,8 @@ spec: metadata: labels: app: api - # A change here rolls the api onto the current image, so it serves the - # POST /hasura hook before Hasura switches to POST mode. + # Changed with Hasura's POST hook mode: the same apply rolls the api onto + # the current image, which serves POST /hasura. annotations: 5stack.gg/hasura-hook-mode: post spec: