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
Hi,
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:
[code]
<ifModule mod_headers.c>
Header set Access-Control-Allow-Origin: *
</ifModule>
[/code]
However I don’t know how dangerous this is, as it allows cross domain requests from everywhere, so please be careful.