2
Custom headers not being sent along with the requests in createPagesServerClient (NextJS)
Source: supabase/supabase#19481 · opened by @Eerkz
Here's how i'm passing the custom headers: const supabase = createPagesServerClient( { req, res }, { supabaseUrl: "", supabaseKey: "", options: { global: { headers: { "x-custom-header": "value", }, }, }, } ); // usage const { data, error } = await supabase.storage .from("sample_bucket") .upload(/${fileName}, decodedImage, { upsert: true, contentType: dataType, }); 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: ((bucket_id = 'sample_bucket'::text) AND some_function_to_run(((current_setting('request.headers::text, true))::json ->> 'x-custom-header'::text))) The some_function_to_run function always receives a…
No pledges yet. Be the first to back this.
Comments
Similar requests
Accept `auth` options passed to `createPagesServerClient`
1 vote · 0 comments
Put versions on documentation
2 votes · 0 comments
Passing custom headers to rpc
1 vote · 0 comments
Retrieve response headers
2 votes · 0 comments
createServerClient singleton pattern Nextjs App Router
9 votes · 0 comments
No comments yet.