CodeIgniter Forums
External Call Controller - Failed - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: External Call Controller - Failed (/showthread.php?tid=68105)



External Call Controller - Failed - master355 - 05-25-2017

Hello, I'm new using CI and I have a little problem.
 
I have development a website with Wordpress (landing page) and it don't have back-end functionallitys. My client wants to some functionality and I´m using CI to make it. The problem is following: 
 
From WordPress page (www.page.com) I want make a ajax request to a Controller_CI method (www.subdomain.page.com/controller/method) to validate login form and later redirect to web system (CI Project), but when I am making ajax request, I see this error in console and it don't make request:
 


Code:
XMLHttpRequest cannot load http://www.subdomain.page.com.ve/controller/method. No 'Access-Control-Allow-Origin'
header is present on the requested resource. Origin 'http://www.page.com.' is therefore not allowed access

 
I suspect that is cause by .htaccess file rules, but I don't know exactly. I don't want merge WordPress Page with Back-End functionality, so I created a subdomain (root folder CI) and separate it.

I hope can help me, thanks!


RE: External Call Controller - Failed - Paradinight - 05-25-2017

https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy


RE: External Call Controller - Failed - master355 - 05-27-2017

(05-25-2017, 09:06 PM)Paradinight Wrote: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy

Thanks!