CORS request won’t trigger making cache?
-
Hi there, I found that a CORS request make by the fetch seems like won’t trigger the cache to be made?
I have set the these headers to make sure cors will work
access-control-allow-headers: Authorization, Content-Type access-control-allow-origin: *
and in the settings panel I have set “Force Public Cache URIs” to
^/graphql
yes, it gets a response with 200 status code, but the payload is empty, not even a single letter. I can confirm that the response header with
x-litespeed-cache:hit
which shows it is a cached response, but with no contents.I could confirm that it works if I just copy and paste the request URL made by the
fetch
to the browser’s address bar(which means it works with the same domain).The
fetch
will send aOPTIONS
request before it can send aGET
request, so I’m guessing maybe LiteSpeed cached theOPTIONS
request instead ofGET
request..?I’m making an API request(GET method) from another domain to an end point of the domain which using this plugin. I want to know if this is a bug or intended?
- The topic ‘CORS request won’t trigger making cache?’ is closed to new replies.