hi, for our app we had to use the native http plu...
# support-questions
e
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
Hey! Yes. Checkout how we have made the axios interceptor: lib/ts/axios.ts
e
Thanks, was looking for that
The custom server/hostname didn't work on Android
r
oh really..
why do you think that's the case?
e
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
(without using http plugin, so we just use fetch)
r
right. Cookie issues.. 😦
e
ye 😛