https://supabase.com/ logo
I can't get the request header of a rpc function
# help
s
I can't get the request header of a rpc function
n
Hello @Sajeev! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
s
basically I am trying to make a database function on supabase, that will get the request header from the request when the function is called from the client side
but I get this error
I am trying to get it by doing current_setting('request.header', true)
s
Copy code
SQL
BEGIN
  RETURN current_setting('request.header', true)::json;
END;
Just tried this and it let me create the function. Not got time to test if it works unfortunately, but might help you
s
thank you let me test that
n
Thread was archived by @Sajeev. Anyone can send a message to unarchive it.