hi,
for our app we had to use the native http plugin from capacitor, which doesnt support interceptor...
any example how to write custom logic to attach the cookies in the headers (for every request)?
r
rp
07/07/2022, 7:37 PM
Hey! Yes. Checkout how we have made the axios interceptor: lib/ts/axios.ts
ah, well i've refactored all my code to use native plugin, but building a interceptor on top of that is a huge one
but we got it working now, on iOS we use a custom hostname so cookies are not blocked by webkit
on android, we removed the custom hostname and just use localhost
downside of this approach is that we have to use sameSite: none