• Resolved yaquawa

    (@yaquawa)


    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 a OPTIONS request before it can send a GET request, so I’m guessing maybe LiteSpeed cached the OPTIONS request instead of GET 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?

    • This topic was modified 3 years, 5 months ago by yaquawa.
    • This topic was modified 3 years, 5 months ago by yaquawa.
    • This topic was modified 3 years, 5 months ago by yaquawa.
Viewing 16 replies (of 16 total)
Viewing 16 replies (of 16 total)
  • The topic ‘CORS request won’t trigger making cache?’ is closed to new replies.