Closed ThornWalli closed 2 years ago
I have the case that the resources are behind an OAuth and need to send an Authorization header with the fetch.
Authorization
I added a new property fetchOptions to the options. This will be passed through to the fetch.
fetchOptions
Usage example:
const ipx = createIPX({ domains: […], aliases: {…}, fetchOptions: { headers: { Authorization: 'Bearer …' } }, // or function call for token handling fetchOptions: async () => { headers: { Authorization: await getToken() } } });
Thanks for PR @ThornWalli <3 Moved to #74
I have the case that the resources are behind an OAuth and need to send an
Authorization
header with the fetch.I added a new property
fetchOptions
to the options. This will be passed through to the fetch.Usage example: