0

I am using ajax in one of my magento project, every thing is working fine with http://url.com but when i use https://url.com it response nothing and show below error.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://url.com. This can be fixed by moving the resource to the same domain or enabling CORS.

How to solve this issue?

Deepak Mankotia
  • 4,404
  • 6
  • 30
  • 55

1 Answers1

0

This happened to me, hope this is the solution. You have to access AJAX request on the same url of the request page:

http://url.com -> http://url.com  
http://www.url.com -> http://www.url.com  
https://url.com -> https://url.com  
Xriuk
  • 382
  • 2
  • 7
  • 26
  • This works for me, but i want to hit ajax from http:// to https://. Is this possible? – Deepak Mankotia Aug 26 '14 at 07:12
  • No, cause it considers `https://` another domain, different from `http://`, there are few server-side plugins to allow Cross-Origins requests but I know nothing about them. Sorry. – Xriuk Aug 26 '14 at 07:14