Understand authorization header behavior during cookie forwarding
mainWhen using cookie forwarding, the authorization header sent by the browser is never passed on to the upstream API, regardless of your proxyMode. The purpose of the authorization header in the incoming request is to authenticate the user against your Nuxt application, not to authenticate your application against the upstream API.
To authenticate your application against the upstream service, use one of the following methods:
- Default Proxy Mode: Use the endpoint's
tokenorheadersconfiguration option, or provide aheadersoption directly in the API call. proxyMode: 'passthrough': Use a request hook to manually attach the required authentication headers.