• Resolved vishwa100

    (@vishwa100)


    Certainly! Here’s a refined version of your question:

    The CORS plugin works perfectly for the root endpoint, but it doesn’t seem to function for requests to https://server/wp-content/uploads/. How can I configure the plugin to handle CORS requests for this specific endpoint?

    • This topic was modified 7 months ago by vishwa100.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dev Kabir

    (@devkabir)

    Hello Vishwa,
    You can manually add CORS headers using a code snippet in your theme’s functions.php file or in a custom plugin and check if the request URI contains /wp-content/uploads/ and, if so, adds the necessary CORS headers.

    Thread Starter vishwa100

    (@vishwa100)

    Thank you for the response, I just had a doubt, If I add the code in functions.php of my theme, will the headers be added if I hit the API. I thought the theme and the actual wordpress code is different

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I want CORS to be enabled for custom endpoint’ is closed to new replies.