android - How to disable react native fetch to store request cache on the disk - Stack Overflow

admin2025-04-04  0

I'm experiencing the very same problem as described in this issue

namely, I noticed that when doing requests using fetch in react native android app (and my assumption this is an inherited behavior of OkHttpClient in Java, but not 100% sure) it creates files with plain text of a request including cookies.

set-cookie: nameOfCookie1=cookieValue1; Max-Age=3600; Path=/; Expires=Wed, 29 Jan 2020 11:47:41 GMT; HttpOnly; Secure
set-cookie: nameOfCookie2=cookieValue2; Max-Age=3600; Path=/; Expires=Wed, 29 Jan 2020 11:

This problem was also flagged by our security team since our app is going to be used in tightly regulated area.

Is it possible to disable this cache? What I've tried so far is to use headers Pragma: no-cache and cache: no-cache while sending the request and it didn't have any effect.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1743749950a217419.html

最新回复(0)