Replies: 2 comments 7 replies
-
There's no way, Remix simulates what the browser does and the browser will not let you send an extra header when doing a document request. If you only send auth information using a header instead of cookie then when the user opens for the first time your app and the browser sends a document request then you will not be able to know who is the user forcing you to fetch all user-specific data client-side, at that point you have full control. Additionally, I think you could use a Service Worker to intercept requests (even document requests) and send the Authorization header, but that's outside Remix. |
Beta Was this translation helpful? Give feedback.
-
@sergiodxa, just had a conversation with Ryan on twitter about this, where he suggested monkey-patching |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to set custom headers when Remix is sending requests to server, for example when it's calling loader?
I want to add header based authentication instead of cookies.
Beta Was this translation helpful? Give feedback.
All reactions