From 31cace9994bd26b72ff03f8e96aef1f454c6b57b Mon Sep 17 00:00:00 2001 From: MisterBlueBear <51129551+MisterBlueBear@users.noreply.github.com> Date: Wed, 18 Oct 2023 21:42:57 -0400 Subject: [PATCH 1/7] nginx conf - Fix for issue #577 --- conf/nginx/webvirtcloud.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/nginx/webvirtcloud.conf b/conf/nginx/webvirtcloud.conf index 3ba36ec..144431b 100644 --- a/conf/nginx/webvirtcloud.conf +++ b/conf/nginx/webvirtcloud.conf @@ -34,6 +34,12 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } + location /websockify { + proxy_pass http://wssocketiod; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } } upstream wsnovncd { From 4aafad668ba33465dd68be0b421e7bb67f877ee0 Mon Sep 17 00:00:00 2001 From: MisterBlueBear <51129551+MisterBlueBear@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:12:20 -0400 Subject: [PATCH 2/7] Location /websockify proxy passes to wsnovncd --- conf/nginx/webvirtcloud.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx/webvirtcloud.conf b/conf/nginx/webvirtcloud.conf index 144431b..153b389 100644 --- a/conf/nginx/webvirtcloud.conf +++ b/conf/nginx/webvirtcloud.conf @@ -35,7 +35,7 @@ server { proxy_set_header Connection "upgrade"; } location /websockify { - proxy_pass http://wssocketiod; + proxy_pass http://wsnovncd; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; From 2072890fc586325a123569df705b31eca74f7060 Mon Sep 17 00:00:00 2001 From: Mark <0x6d61726b@gmail.com> Date: Thu, 26 Oct 2023 21:53:04 +0200 Subject: [PATCH 3/7] Fixed nginx X-Forwarded-Proto to match the protocol ("http", "https") --- conf/nginx/webvirtcloud.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx/webvirtcloud.conf b/conf/nginx/webvirtcloud.conf index 3ba36ec..f18585b 100644 --- a/conf/nginx/webvirtcloud.conf +++ b/conf/nginx/webvirtcloud.conf @@ -14,7 +14,7 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; - proxy_set_header X-Forwarded-Proto $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Ssl off; proxy_connect_timeout 1800; proxy_read_timeout 1800; From 5c6bcbe610fae62b208272c0416ede5dc8905768 Mon Sep 17 00:00:00 2001 From: Mark <0x6d61726b@gmail.com> Date: Thu, 26 Oct 2023 22:18:17 +0200 Subject: [PATCH 4/7] Fixes issue #614: Quick Install overrides nginx upstream wssocketiod port --- webvirtcloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webvirtcloud.sh b/webvirtcloud.sh index 3df52bd..f66cb0f 100755 --- a/webvirtcloud.sh +++ b/webvirtcloud.sh @@ -174,7 +174,7 @@ configure_nginx () { fi novncd_port_escape="$(echo -n "$novncd_port"|sed -e 's/[](){}<>=:\!\?\+\|\/\&$*.^[]/\\&/g')" - sed -i "s|\\(server 127.0.0.1:\\).*|\\1$novncd_port_escape;|" "$nginxfile" + sed -i "s|server 127.0.0.1:6080;|server 127.0.0.1:$novncd_port_escape;|" "$nginxfile" } From cc867304414b5be9340aa76d7296576a4df4f1b1 Mon Sep 17 00:00:00 2001 From: Mark <0x6d61726b@gmail.com> Date: Thu, 26 Oct 2023 22:43:27 +0200 Subject: [PATCH 5/7] Corrected X-Forwarded-Proto meaning for Gunicorn --- conf/nginx/webvirtcloud.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx/webvirtcloud.conf b/conf/nginx/webvirtcloud.conf index f18585b..16128f3 100644 --- a/conf/nginx/webvirtcloud.conf +++ b/conf/nginx/webvirtcloud.conf @@ -14,7 +14,7 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; - proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Proto http; proxy_set_header X-Forwarded-Ssl off; proxy_connect_timeout 1800; proxy_read_timeout 1800; From 6974eae62ed48b530fa236f37de72b37cbd15627 Mon Sep 17 00:00:00 2001 From: catborise Date: Mon, 30 Oct 2023 15:36:40 +0300 Subject: [PATCH 6/7] static_root and static_dirs fix --- webvirtcloud/settings.py.template | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/webvirtcloud/settings.py.template b/webvirtcloud/settings.py.template index 50dce23..befe70d 100644 --- a/webvirtcloud/settings.py.template +++ b/webvirtcloud/settings.py.template @@ -123,11 +123,12 @@ USE_TZ = True STATIC_URL = "/static/" if not DEBUG: - STATIC_ROOT = Path.joinpath(BASE_DIR, "static") -else: - STATICFILES_DIRS = [ - Path.joinpath(BASE_DIR, "static"), - ] + STATIC_ROOT = "" + +STATICFILES_DIRS = [ + Path.joinpath(BASE_DIR, "static"), +] + BS_ICONS_CACHE = Path.joinpath(BASE_DIR, 'static/icon_cache') From 7171a70f75972550f3059cfff7322c6dcc1ecf1f Mon Sep 17 00:00:00 2001 From: catborise Date: Mon, 30 Oct 2023 15:56:54 +0300 Subject: [PATCH 7/7] update requirements --- conf/requirements.txt | 14 +++++++------- dev/requirements.txt | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/conf/requirements.txt b/conf/requirements.txt index 64206b8..7fb25f8 100644 --- a/conf/requirements.txt +++ b/conf/requirements.txt @@ -1,20 +1,20 @@ -Django==4.2.5 +Django==4.2.6 django_bootstrap5==23.3 -django-bootstrap-icons==0.8.3 +django-bootstrap-icons==0.8.6 django-login-required-middleware==0.9.0 -django-otp==1.2.2 +django-otp==1.2.4 django-qr-code==3.1.1 gunicorn==21.2.0 libsass==0.22.0 -libvirt-python==9.7.0 +libvirt-python==9.8.0 lxml==4.9.3 qrcode==7.4.2 rwlock==0.0.7 websockify==0.11.0 -zipp==3.16.2 +zipp==3.17.0 ldap3==2.9.1 -python-engineio==4.7.0 -python-socketio==5.9.0 +python-engineio==4.8.0 +python-socketio==5.10.0 eventlet==0.33.3 djangorestframework==3.14.0 drf-nested-routers==0.93.4 diff --git a/dev/requirements.txt b/dev/requirements.txt index 0ff16a8..45c1c6a 100644 --- a/dev/requirements.txt +++ b/dev/requirements.txt @@ -2,8 +2,8 @@ coverage==7.3.0 django-debug-toolbar==4.2.0 django-debug-toolbar-template-profiler -pycodestyle==2.11.0 +pycodestyle==2.11.1 pyflakes==3.1.0 -pylint==2.17.5 -yapf==0.40.1 -black==23.7.0 +pylint==3.0.2 +yapf==0.40.2 +black==23.10.1