arthurfiorette / axios-cache-interceptor

📬 Small and efficient cache interceptor for axios. Etag, Cache-Control, TTL, HTTP headers and more!

Home Page:https://axios-cache-interceptor.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CORS errors when using axios-cache-interceptor

mmoore99 opened this issue · comments

I am attempting to add axios-cache-interceptor to a web app that is using axios and has been working fine without any cache functionality. When I activate axios-cache-interceptor I am getting CORS errors that I do not get when axios-cache-interceptor is not activated. An example of the error is as follows:
Access to XMLHttpRequest at 'https://api.themoviedb.org/3/tv/13335/watch/providers?cache-buster=1686948751542' from origin 'https://fiddleshows.ngrok.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I would appreciate any guidance as to how to resolve this issue as it only occurs when axios-cache-interceptor is activated.

I am using Axios 1.4.0 and axios-cache-interceptor 1.2.0.

Does #471 solve your issue?

Does #471 solve your issue?

Yes, that does solve the issue. Thanks for your speedy response.