On Fri, Feb 2, 2018 at 8:16 PM, zhangbin <zhang...@iat.one> wrote: > I tried the way you said, but I'm not sure if there is a bug in my json > format for submitting data, or anything else,I get an error XMLHttpRequest > can not load http://10.128.0.211:8080/guacamole/api/tokens. No > 'Access-Control-Allow-Origin' header is present on the requested resource. > Origin 'null' is therefore not allowed. > > Your browser is denying the request because it violates cross-origin policy. If you need to do this, you will need to either ensure that the requests are not cross-origin, or use a proxy to insert the necessary CORS headers (and enable CORS on your XMLHttpRequest instance) for the request to succeed.
Before you go too deeply into this, though, it'd be nice to know what you're actually planning to accomplish here. I'm not convinced this is a good approach for ... just about anything. If you're just trying to provide remote desktop functionality within your application powered by Guacamole, there is an API for that (guacamole-common and guacamole-common-js) and there is no need to embed the entire mainline web application, deal with the REST API, etc. - Mike