From 1ad84164a68b7eb381b93bb83b5906b9eb5950e0 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Mon, 3 Mar 2025 19:43:12 -0600 Subject: [PATCH 1/5] Fixed issues with not being able to create a super user. --- dispatcharr/settings.py | 5 ++++- dispatcharr/urls.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dispatcharr/settings.py b/dispatcharr/settings.py index bb4a7f4e..3d2b90b0 100644 --- a/dispatcharr/settings.py +++ b/dispatcharr/settings.py @@ -140,7 +140,10 @@ SERVER_IP = "127.0.0.1" CORS_ALLOW_ALL_ORIGINS = True CORS_ALLOW_CREDENTIALS = True -CSRF_TRUSTED_ORIGINS = ['*'] +CSRF_TRUSTED_ORIGINS = [ + 'http://*', + 'https://*' +] APPEND_SLASH = True REST_FRAMEWORK = { diff --git a/dispatcharr/urls.py b/dispatcharr/urls.py index 4aa72aa6..3a3b3672 100644 --- a/dispatcharr/urls.py +++ b/dispatcharr/urls.py @@ -24,14 +24,14 @@ schema_view = get_schema_view( urlpatterns = [ # API Routes path('api/', include(('apps.api.urls', 'api'), namespace='api')), - path('output/', include('apps.output.urls', namespace='output')), + path('api', RedirectView.as_view(url='/api/', permanent=True)), # Admin path('admin', RedirectView.as_view(url='/admin/', permanent=True)), # This fixes the issue path('admin/', admin.site.urls), # Outputs - path('output', RedirectView.as_view(url='/output/', permanent=True)), # This fixes the issue + path('output', RedirectView.as_view(url='/output/', permanent=True)), path('output/', include(('apps.output.urls', 'output'), namespace='output')), # HDHR From 23788ffcbe61eefd23cd5475f87d5c1966cae4bf Mon Sep 17 00:00:00 2001 From: dekzter Date: Tue, 4 Mar 2025 08:22:14 -0500 Subject: [PATCH 2/5] fixing csrf origins --- dispatcharr/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dispatcharr/settings.py b/dispatcharr/settings.py index bb4a7f4e..261b49ee 100644 --- a/dispatcharr/settings.py +++ b/dispatcharr/settings.py @@ -140,7 +140,10 @@ SERVER_IP = "127.0.0.1" CORS_ALLOW_ALL_ORIGINS = True CORS_ALLOW_CREDENTIALS = True -CSRF_TRUSTED_ORIGINS = ['*'] +CSRF_TRUSTED_ORIGINS = [ + 'http://*', + 'https://*' +] APPEND_SLASH = True REST_FRAMEWORK = { From a9fdb90ac56db8639641a4b7c271fdaed8b1cead Mon Sep 17 00:00:00 2001 From: dekzter Date: Tue, 4 Mar 2025 08:30:52 -0500 Subject: [PATCH 3/5] Removed duplicate sentence-transformers install --- docker/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index d9373c29..10703354 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,8 +25,6 @@ RUN apt-get update && \ pip install --no-cache-dir -r requirements-pytorch.txt && \ pip install --no-cache-dir -r requirements-sentence-transformers.txt && \ python manage.py collectstatic --noinput && \ - echo "installing sentence-transformers" && \ - pip install sentence-transformers==3.4.1 && \ cd /app/frontend && \ npm install && \ npm run build && \ From b8b58d29bdf9422673c09bf3cdc53a55f05f3bed Mon Sep 17 00:00:00 2001 From: dekzter Date: Tue, 4 Mar 2025 08:53:42 -0500 Subject: [PATCH 4/5] removed extra requirements files --- docker/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 10703354..1a011943 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,8 +22,6 @@ RUN apt-get update && \ git clone https://github.com/Dispatcharr/Dispatcharr /app && \ cd /app && \ pip install --no-cache-dir -r requirements.txt && \ - pip install --no-cache-dir -r requirements-pytorch.txt && \ - pip install --no-cache-dir -r requirements-sentence-transformers.txt && \ python manage.py collectstatic --noinput && \ cd /app/frontend && \ npm install && \ From b8884c851b623ef94a57159d729366a15ff1ea5c Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Tue, 4 Mar 2025 08:09:41 -0600 Subject: [PATCH 5/5] Don't sync custom AIO --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9a8b48aa..3853c165 100755 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ __pycache__/ node_modules/ .history/ staticfiles/ +docker/DockerfileAIO