Closed azu closed 1 year ago
Workaround: Always use cache busting parameter like ?cache={id}
Probably, Netlify cache the url with parameter. (So, I can purge cache via ?1
)
We can avoid the cache by cache buster paramter.
/api/...?cache_buster_uuid=xxxxx
https://irodr.netlify.app/api/0/subscription/list
still return unknown cache.
We will drop to use Netlify's _redirect.
We have locked https://irodr.netlify.app/ untill fix this issue.
Workaround:
git clone https://github.com/azu/irodr
yarn install
yarn start
Workaround
You can use UserScript to connect Inoreader API directly.
* Clear IndexedDB, LocalStorage * Install: https://github.com/azu/irodr/blob/master/resources/userScript/irodr-cors.js
Current Status. irodr require workaround scripts.
Summary:
We have used Netlify Edge Function instead of _redirects
proxy and fixed this issue.
I do not understand that _redirects
cause this issue.
However, The behaviour of _redirect
is so strange that we decided to avoid using it.
I wrote CORS Proxy as code using Edge Functions.
Proxy would have been avoided if possible, but other methods are not very usable. Proxy has the risk that the operator(me) can peek into the user's Inoreader API communication. To avoid this, we do not include console logs in the Proxy.
Of couse, You can connect Inoreader API without Proxy using UserScripts.
Disclaimer: Netlify Edge Function has Quota, so CORS Proxy may stop if it determines that usage is too high.
5 GB / 1 TB bandwidth
58 / 25,000 build minutes
0 / 2M edge function invocations
At 2023-07-19, We have disabled Netlify CORS Proxy. It means that user can not fetch ironoreader API by default.
š Inoreader API does not support CORS. Instead of It, we have used CORS Proxy.
Workaround
You can use UserScript to connect Inoreader API directly.
What's happened
We have used Netlify's
_redirect
for CORS ProxyHowever, This Proxy cached unknown response.
https://irodr.netlify.app/api/0/subscription/list
The response's
Age
is old, and return old results. Additionaly, this endpoint ignore Authorization` request header and return the cache.I've tests other API liks
/api/0/user-info
but it works.After I deleted Netlify _redirect, but
https://irodr.netlify.app/api/0/subscription/list
still return unknown response. I tested Cross browser, Cross Device. (curl can not fetch the cache, it related to some header?) I think something strange is happening to Netlify.š I request
https://irodr.netlify.app/api/0/subscription/list?1
and prune the cache.Research
Inoreader API does not return the ETags and Last-Modified.
TODO
_redirect
tonetlify.toml
(Same?)_redirect
does not support local emurating