Hasura_Graphql_Auth_Hook Custom Http Headers from Auth Endpoint are not forwarded to Response via Ngnix #8802
Replies: 2 comments 3 replies
-
Hasura GraphQl Version 2.7.0 |
Beta Was this translation helpful? Give feedback.
-
@geeksquad87 From the docs,
This is the exception to the rule that other headers are discarded. I am going to convert this discussion into an issue for our Product team to triage as a feature request. Meanwhile is using the set-cookie header as a workaround going to work for you (Envoy checks if there's a cookie, changes the status code, removes the set-cookie header)? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I configured a NodeJs based simple POST Rest API as Authentication Endpoint for Hasura_Graphql_Auth_Hook . In my Auth WebHook endpoint, I am adding a custom header after validating the Authorization header received from original GraphQl Request. (Works fine)
After Authenticating, I am setting a Custom header using (Express).Response.setHeader("MyCustomHeader","MyCustomValue") to the response headers. If I run the POST Authentication Endpoint directly from Postman, I can see the Custom Header in the Response correctly.
However when I run the Hasura Engine GraphQL POST Endpoint configured with POST HTTP Auth Endpoint as Hasura_Graphql_Auth_Hook , the custom header added in the Authentication Endpoint is not received in the final response. I am using Envoy for reverse proxy. I had added logging in Envoy, and I do not see Custom Header in the Envoy Http Filters either.
Any help please ? My end goal is, based on this Custom Header from Auth Web Hook, I want to change the status code in the Final Response using Envoy.
Beta Was this translation helpful? Give feedback.
All reactions