FeatureFuel
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.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests