You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Dan Haywood <da...@haywood-associates.co.uk> on 2016/03/29 08:03:40 UTC

Re: XMLHttpRequest cannot load

This is a CORS error ... a security precaution implemented by web
browsers.  It prevents your Javascript is attempting to make a RESTful call
to a different URL (192.168.0.20) than it was served from (localhost).

You either need to serve the Javascript itself from that same origin
(192.168.0.20) or add in a CORS filter to your web.xml, see eg [1]

HTH
Dan

[1]
https://github.com/incodehq/contactapp/blob/master/backend/webapp/src/main/webapp/WEB-INF/web.xml#L38



On 28 March 2016 at 22:25, Arturo Ulises Castañeda Estrada <
arturo.castaneda@sisorg.com.mx> wrote:

> Hi Dan,
>
>
> I'm trying to persist but the server says that i dont have access and u
> get next error:
>
>
> XMLHttpRequest cannot load http://192.168.0.20:8080/restful/user.
> Response to preflight request doesn't pass access control check: No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
> Origin 'http://localhost:8100' is therefore not allowed access. The
> response had HTTP status code 401.
>
>
>

Re: XMLHttpRequest cannot load

Posted by Arturo Ulises Castañeda Estrada <ar...@sisorg.com.mx>.
thank you Dan I could resolve the problem

________________________________________
De: Dan Haywood <da...@haywood-associates.co.uk>
Enviado: martes, 29 de marzo de 2016 12:03 a. m.
Para: users
Asunto: Re: XMLHttpRequest cannot load

This is a CORS error ... a security precaution implemented by web
browsers.  It prevents your Javascript is attempting to make a RESTful call
to a different URL (192.168.0.20) than it was served from (localhost).

You either need to serve the Javascript itself from that same origin
(192.168.0.20) or add in a CORS filter to your web.xml, see eg [1]

HTH
Dan

[1]
https://github.com/incodehq/contactapp/blob/master/backend/webapp/src/main/webapp/WEB-INF/web.xml#L38



On 28 March 2016 at 22:25, Arturo Ulises Castañeda Estrada <
arturo.castaneda@sisorg.com.mx> wrote:

> Hi Dan,
>
>
> I'm trying to persist but the server says that i dont have access and u
> get next error:
>
>
> XMLHttpRequest cannot load http://192.168.0.20:8080/restful/user.
> Response to preflight request doesn't pass access control check: No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
> Origin 'http://localhost:8100' is therefore not allowed access. The
> response had HTTP status code 401.
>
>
>