- Posts: 4
Shop / e-Commerce Integration
Cross Origin Request Blocked from Moodle
- Miguel A García Fustes
- Topic Author
- Offline
- New Member
-
Less
More
5 years 2 months ago #1
by Miguel A García Fustes
Cross Origin Request Blocked from Moodle was created by Miguel A García Fustes
Hello,
I have integrated my Joomla site with Moodle using Joomdle and everything works apparently fine.
The problem has arisen in the integration with the online store (J2Store) and its Easycheckout component. When a user registers in the checkout the system gets blocked before accessing the payment gateway (PayPal), and I get the following error in console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://MI_MOODLE_SITE/auth/joomdle/land.php?username=maikolort%40gmail.com&token=bb3776a69f9ded009915b7d5dc2cc617&use_wrapper=0&create_user=0&wantsurl=%2Fcomponent%2Feasycheckout%2F. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)
What can I do??
I have integrated my Joomla site with Moodle using Joomdle and everything works apparently fine.
The problem has arisen in the integration with the online store (J2Store) and its Easycheckout component. When a user registers in the checkout the system gets blocked before accessing the payment gateway (PayPal), and I get the following error in console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://MI_MOODLE_SITE/auth/joomdle/land.php?username=maikolort%40gmail.com&token=bb3776a69f9ded009915b7d5dc2cc617&use_wrapper=0&create_user=0&wantsurl=%2Fcomponent%2Feasycheckout%2F. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)
What can I do??
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7930
5 years 2 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Cross Origin Request Blocked from Moodle
Hi.
Some questions:
- Are Joomla and Moodle on different domains, or is Moodle inside a folder like site.com/courses?
- In Joomdle configuration in Joomla, is Use redirect-less SSO enabled?
Podemos hablar en español si lo prefieres.
Some questions:
- Are Joomla and Moodle on different domains, or is Moodle inside a folder like site.com/courses?
- In Joomdle configuration in Joomla, is Use redirect-less SSO enabled?
Podemos hablar en español si lo prefieres.
Please Log in or Create an account to join the conversation.
- Miguel A García Fustes
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
5 years 2 months ago #3
by Miguel A García Fustes
Replied by Miguel A García Fustes on topic Cross Origin Request Blocked from Moodle
Ahora mismo está en desarrollo y ambos sitios son subdominio del mismo dominio.
He resuelto de todos modos configurando ambos sitios con método de conexión cURL y usar SSO sin redirección.
El paso a producción del sitio Joomla será un dominio y el Moodle a un subdominio del sitio Joomla. Entiendo que no será un problema.
Gracias Antonio, y perdona las molestias.
He resuelto de todos modos configurando ambos sitios con método de conexión cURL y usar SSO sin redirección.
El paso a producción del sitio Joomla será un dominio y el Moodle a un subdominio del sitio Joomla. Entiendo que no será un problema.
Gracias Antonio, y perdona las molestias.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7930
5 years 2 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Cross Origin Request Blocked from Moodle
No es molestia ninguna, yo te iba a sugerir que probases eso mismo si se daban las condiciones.
Pero esto es importante: SSO sin redirección no funciona cuando Joomla y Moodle están en dominios diferentes, precisamente por temas de seguridad entre dominios.
Eso incluye los subdominios.
Por eso te recomiendo que cambies tu setup de modo que tengas site.com/cursos o similar, en lugar de cursos.site.com.
Pero esto es importante: SSO sin redirección no funciona cuando Joomla y Moodle están en dominios diferentes, precisamente por temas de seguridad entre dominios.
Eso incluye los subdominios.
Por eso te recomiendo que cambies tu setup de modo que tengas site.com/cursos o similar, en lugar de cursos.site.com.
Please Log in or Create an account to join the conversation.
- Miguel A García Fustes
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
5 years 2 months ago #5
by Miguel A García Fustes
Replied by Miguel A García Fustes on topic Cross Origin Request Blocked from Moodle
Entiendo que para eso necesito crear una carpeta en mi instalación de Joomla que contenga la instalación de Moodle. ¿No es así?
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7930
5 years 2 months ago #6
by Antonio Durán
Replied by Antonio Durán on topic Cross Origin Request Blocked from Moodle
Si, sería tener instalado Moodle en una carpeta dentro tu carpeta principal del site.
Please Log in or Create an account to join the conversation.