Skip to content

Commit

Permalink
feat: add config for deployment under specific URL prefix (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
czosel authored Nov 15, 2021
1 parent 3438a53 commit 6801024
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions document_merge_service/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,5 @@ def get_unoconv_formats():
},
"loggers": {"django": {"handlers": ["console"], "level": "WARNING"}},
}

URL_PREFIX = env.str("URL_PREFIX", default="")
3 changes: 2 additions & 1 deletion document_merge_service/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.conf import settings
from django.conf.urls import include
from django.urls import re_path

urlpatterns = [re_path(r"^api/v1/", include("document_merge_service.api.urls"))]
urlpatterns = [re_path(f"^{settings.URL_PREFIX}api/v1/", include("document_merge_service.api.urls"))]

0 comments on commit 6801024

Please sign in to comment.