Cross-Origin Request Blocked:

sbhadauria
@sbhadauria
10 years ago
129 posts
After fresh installation of jamroom we are not able to login and getting below mentioned error:

"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.yoursite.com/user/login_save/__ajax=1. This can be fixed by moving the resource to the same domain or enabling CORS."

Kindly suggest?
updated by @sbhadauria: 07/30/14 01:35:08PM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
You've got a url hard coded somewhere, maybe in the skin. Change it to use a variable.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
sbhadauria
@sbhadauria
10 years ago
129 posts
we have not used any hard coded URL.
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Then a url in the db maybe? (if you are transferring a db as well)


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
10 years ago
10,148 posts
sbhadauria:
After fresh installation of jamroom we are not able to login and getting below mentioned error:

"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.yoursite.com/user/login_save/__ajax=1. This can be fixed by moving the resource to the same domain or enabling CORS."

Kindly suggest?

This means the form "action" is being directed at a different domain than the login for is being presented on. Most likely you have Jamroom setup to use a "www" URL (or a non-www URL) and you are accessing it at the other.

Make sure you are accessing at the correct URL, and then make sure your .htaccess file is updated to redirect all non-www (or www if you want to run on the naked domain, which I would not recommend) to the opposite.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags