trpc-panel
trpc-panel copied to clipboard
Define custom HTTP headers in code
As a person viewing the tRPC Panel, I would like to be able to have custom tRPC HTTP headers added automatically instead of manually adding them via the tRPC Panel's UI, so I can save time from copying auth tokens from my app to the panel.
Would it be possible to add custom header values to the renderTrpcPanel function as an option? This way, the app that is rendering the panel can generate an Authorization header (or any other custom headers) when the panel is initiated.
It's funny you mention this - this is actually something I started implementing but never fully finished out b/c I wasn't sure how much people wanted it.
yes - Definitely would be a great feature for this lib I think.
just the ability to pass any headers object to the renderTrpcPanel function? Will probably merge them with saved headers if they exist
This would be a great feature! Allows to make authentication automatic (:
I second this 😅