Giter VIP home page Giter VIP logo

Comments (9)

dobin avatar dobin commented on July 18, 2024 1

Thanks a lot. I was initially unable to make lxd-webgui work too (again...). but after some hours of debugging:

There are a variety of problems here:

  • The LXD version of Ubuntu 16.04 does not support the "core.https_allowed_credentials", which is pretty important
  • Chrome will use "localhost:8000" as origin
  • While Firefox will use "127.0.0.1:8000" as origin
  • Firefox will not send its client certificate on XHR requests if "with-credentials" in not specified in the ajax request (therefore depends on the allowed_credentials response header)

So i got it to work on Ubuntu 16.04 with:

CC #42, #39, #36

from lxd-webgui.

ascorbic-acid avatar ascorbic-acid commented on July 18, 2024

hello

i have the same problem, this is from https://localhost:9000/
{"type":"sync","status":"Success","status_code":200,"operation":"","error_code":0,"error":"","metadata":["/1.0"]}

from lxd-webgui.

iqido-systems avatar iqido-systems commented on July 18, 2024

I have same problem too on Ubuntu 14.04. Please help.

from lxd-webgui.

PBXForums avatar PBXForums commented on July 18, 2024

Same here, maybe I should have looked here first at the unanswered post going back to may.

from lxd-webgui.

dobin avatar dobin commented on July 18, 2024

Sorry, other projects had higher priority than this one. Will look into it the next few days.

from lxd-webgui.

dobin avatar dobin commented on July 18, 2024

Ok guys, can you try to specify the allowed IP addresses, instead of using "*"?

$ sudo lxc config set core.https_allowed_origin <your_ip_addess>

Maybe <your_ip_address> is 127.0.0.1, or your real internal ip (192.168....).

from lxd-webgui.

tgrenda34 avatar tgrenda34 commented on July 18, 2024

I am in the same situation. Here is my lxc config:
config:
core.https_address: 0.0.0.0:9000
core.https_allowed_credentials: "true"
core.https_allowed_headers: Origin, X-Requested-With, Content-Type, Accept
core.https_allowed_methods: GET, POST, PUT, DELETE, OPTIONS
core.https_allowed_origin: 10.1.0.10
core.trust_password: true
I've tried the following settings for core.https_allowed_origin:
https://localhost:8000
https://0.0.0.0:8000
https://10.1.0.10:8000 (Server IP address)
https://10.1.0.86:8000 (Remote PC IP address accessing WEBGUI)
"*"
All of these setting result in the same "Could not get config from server: https://localhost:9000" error.
Any assistance would be appreciated. I rebuilt the Ubuntu 16.04 server and followed the following guide to install lxd:
https://linuxcontainers.org/lxd/getting-started-cli/

I can access the API at the following URL:
http://10.1.0.10:9000 and I receive the following response:
{"type":"sync","status":"Success","status_code":200,"operation":"","error_code":0,"error":"","metadata":["/1.0"]}

I am running the web server using the following command:
http-server -S -a 0.0.0.0 -p 8000

Any assistance would be greatly appreciated. I cannot find any errors in the lxd.log and nothing in journalctl -xe. Are there any other places to look for errors?

Thanks in advance.

from lxd-webgui.

dobin avatar dobin commented on July 18, 2024

For further reference: Debugging involves using F12 "Console" to see Cross-Origin request error, "Network" to see actual requests and HTTP headers, and starting LXD with the following command line:

/usr/bin/lxd --group lxd --logfile=/var/log/lxd/lxd.log --debug --verbose

from lxd-webgui.

najamelan avatar najamelan commented on July 18, 2024

I got it working in firefox by setting:
core.https_allowed_origin "https://127.0.0.1:8000"

as firefox doesn't send localhost

from lxd-webgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.