Custom headers not being sent along with the requests in createPagesServerClient (NextJS) #19481
Unanswered
Eerkz
asked this question in
Feature Requests
Replies: 3 comments
|
Can you test that out on just a database postgrest rpc call? |
0 replies
I've tried what you suggested and createPagesServerClient custom headers does work with rpc calls. |
0 replies
|
So it is not a bug then. It is just not currently supported in storage and would need to be a feature request. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Here's how i'm passing the custom headers:
I'm trying to access this custom header in a function meant to run in an RLS policy for a supabase storage bucket. Here's the policy:
The
some_function_to_runfunction always receives a null input. I tried debugging things to see what does current_setting('request.heders') return by logging the it in thesome_function_to_runfunction and it indeed doesn't include my custom header. Not really sure what i'm doing wrong here. Here's thesome_function_to_runimplementation:I've also tried using createClient() instead but still having the same problem.
I'm using Next.js v13.4.10 and supabse-js v2.26.0.
All reactions