mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
merged main
This commit is contained in:
commit
e8b151f0dc
2 files changed
+4
-3
No files matched your search
@@ -7,10 +7,11 @@ from django.conf.urls.static import static
|
||||
from django.views.static import serve
|
||||
import os
|
||||
|
||||
# Ensure the admin path is clean and always ends with a slash for Django
|
||||
# Clean the admin path
|
||||
admin_url = os.environ.get('ADMIN_URL', 'admin').strip('/')
|
||||
|
||||
urlpatterns = [
|
||||
# Ensure admin ends with a slash for Django's redirection logic
|
||||
path(f'{admin_url}/', admin.site.urls),
|
||||
path('api/', include('api.urls')),
|
||||
path('api/token/', obtain_auth_token, name='api_token'),
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ services:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=narl"
|
||||
- "traefik.http.routers.holy-backend.priority=20"
|
||||
- "traefik.http.routers.holy-backend.rule=Host(`holy.narl.io`) && (PathPrefix(`/api`)||PathPrefix(`/admin`)||PathPrefix(`/static`)||PathPrefix(`/media`))"
|
||||
- "traefik.http.routers.holy-backend.rule=Host(`holy.narl.io`) && PathPrefix(`/api`, `/admin`, `/static`, `/media`)"
|
||||
- "traefik.http.routers.holy-backend.entrypoints=websecure"
|
||||
- "traefik.http.routers.holy-backend.tls.certresolver=https_resolver"
|
||||
- "traefik.http.services.holy-backend.loadbalancer.server.port=8000"
|
||||
@@ -38,7 +38,7 @@ services:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=narl"
|
||||
- "traefik.http.routers.holy-frontend.priority=10"
|
||||
- "traefik.http.routers.holy-frontend.rule=Host(`holy.narl.io`) && ! (PathPrefix(`/api`)||PathPrefix(`/admin`)||PathPrefix(`/static`)||PathPrefix(`/media`))"
|
||||
- "traefik.http.routers.holy-frontend.rule=Host(`holy.narl.io`)"
|
||||
- "traefik.http.routers.holy-frontend.entrypoints=websecure"
|
||||
- "traefik.http.routers.holy-frontend.tls.certresolver=https_resolver"
|
||||
- "traefik.http.services.holy-frontend.loadbalancer.server.port=80"
|
||||
|
||||
Reference in new issue
Block a user