Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cors error when attempting to access webgui #31

Closed
egeexyz opened this issue Nov 6, 2016 · 3 comments
Closed

Cors error when attempting to access webgui #31

egeexyz opened this issue Nov 6, 2016 · 3 comments

Comments

@egeexyz
Copy link

egeexyz commented Nov 6, 2016

First time setting this project up, followed the documentation word-for-word several times.

Upon loading into either the webgui or the https://localhost:9000/ endpoint, a certificate warning is issued. The warning can be bypassed and the LXD endpoint returns a 200 with some data.

The webgui also returns a certificate error (ERR_CERT_AUTHORITY_INVALID) along with a cors error (both Chrome and Firefox. I know Chrome is really picky about cors stuff):

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:9000/1.0. (Reason: expected ‘true’ in CORS header ‘Access-Control-Allow-Credentials’).

Because of this error, I am unable to functionally use webgui

@egeexyz
Copy link
Author

egeexyz commented Nov 6, 2016

I believe the core of this issue is that the following configuration entry is missing from LXD:

lxc config set core.https_allowed_credentials

@egeexyz
Copy link
Author

egeexyz commented Nov 6, 2016

Ok, solved the problem -

This web app is only compatible with lxd 2.2 and above. Ubuntu 16.04 only comes with lxd 2.1 which does not have the configuration setting "core.https_allowed_credentials" which is required for cross-origin stuff.

I recommend updating the documentation to state that this app is only compatible with later versions of LXD. I used the following PPA to update mine - https://launchpad.net/~ubuntu-lxc/+archive/ubuntu/lxd-stable

@egeexyz egeexyz closed this as completed Nov 6, 2016
@dobin
Copy link
Owner

dobin commented Nov 9, 2016

Strange, I also use 16.04, i thought they updated their packages with the current LXD version. I'll check and updated readme accordingly, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants