Title: Admin-ajax.php CORS Error
Last modified: January 13, 2022

---

# Admin-ajax.php CORS Error

 *  Resolved [Tyke79](https://wordpress.org/support/users/tyke79/)
 * (@tyke79)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/admin-ajax-php-cors-error/)
 * I run into a CORS problem when loading the ‘/wp-admin/admin-ajax.php’ in the 
   projects section of my website.
 * I have added the following directive in the htacces, but it still doesn’t work.
 * I would appreciate any suggestions on how to fix the problem.
 *     ```
       <IfModule mod_headers.c>    
           Header set Access-Control-Allow-Origin *
       </IfModule>
       ```
   
 * Thanks in advance
 * I provide a screenshot
 * [https://prnt.sc/26d40kt](https://prnt.sc/26d40kt)
    -  This topic was modified 4 years, 4 months ago by [Tyke79](https://wordpress.org/support/users/tyke79/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [shift8](https://wordpress.org/support/users/shift8/)
 * (@shift8)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/admin-ajax-php-cors-error/#post-15316291)
 * Oh this is a super odd problem!
 * First of all thanks for using our service 🙂
 * Our plugin is only supposed to rewrite requests to go through the CDN if they
   are static elements (i.e. css, images, etc).
 * Are you creating your own rewrite rules to use our CDN? IF you dont mind pasting
   your .htaccess and/or Apache (or other) site config?
 * Thanks!
 *  Plugin Author [shift8](https://wordpress.org/support/users/shift8/)
 * (@shift8)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/admin-ajax-php-cors-error/#post-15399686)
 * Going to close this issue but feel free to update or reach out directly if you
   want to troubleshoot it further.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Admin-ajax.php CORS Error’ is closed to new replies.

 * ![](https://ps.w.org/shift8-cdn/assets/icon-256x256.png?rev=3343767)
 * [Shift8 CDN](https://wordpress.org/plugins/shift8-cdn/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shift8-cdn/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shift8-cdn/)
 * [Active Topics](https://wordpress.org/support/plugin/shift8-cdn/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shift8-cdn/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shift8-cdn/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [shift8](https://wordpress.org/support/users/shift8/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/admin-ajax-php-cors-error/#post-15399686)
 * Status: resolved