Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Cross Domain Error with WPML- No 'Access-Control-Allow-Origin' header is present › Reply To: Cross Domain Error with WPML- No 'Access-Control-Allow-Origin' header is present
I’m not sure if this is going to work at all, even if somehow the cross domain restriction is fixed, but it’s worth a try of course.
The access must be granted on the target server. In this case you need to edit the wp-content/plugins/ajax-search-pro/ajax_search.php file and add this line after line 20:
Don’t forget to change the yourdomain.com to the other domain (the “www.” part might be needed as well, I’m not sure).
If that doesn’t work, then there is a possible .htaccess solution as well:
<ifModule mod_headers.c> Header set Access-Control-Allow-Origin: * </ifModule>
However I don’t know how dangerous this is, as it allows cross domain requests from everywhere, so please be careful.Best,
If you like my products, don't forget to rate them on codecanyon :)