I would like to add a header to EVERY outgoing http request (for both pages and api).
Is there build in way to do so globally in nextjs
?
Context:
I use Firebase
‘s App Hosing
to host nextjs
14 app.
Due to technical issue, it does not support Set-Cookie
at this point, hence no cookies, hence I cannot follow the best prcatices for authentication/authorization documented in nextjs
site (https://nextjs.org/docs/pages/building-your-application/authentication).
I’d like to add Bearer
token to every http requests the browser makes to the server without using service worker