Skip to content

Commit 717eef6

Browse files
committed
Support BASE_PATH setting in netbox (#24)
Merge branch 'Logan2211:base-path' into master
2 parents 4979c55 + 7ced80a commit 717eef6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

templates/uwsgi.ini.j2

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ processes={{ netbox_processes }}
88
module=netbox.wsgi
99
virtualenv={{ netbox_virtualenv_path }}
1010
chdir={{ netbox_current_path }}/netbox
11-
static-map=/static={{ netbox_current_path }}/netbox/static
11+
{% if netbox_config.BASE_PATH is defined %}
12+
{% set _base_path = netbox_config.BASE_PATH.strip('/') ~ '/' %}
13+
{% else %}
14+
{% set _base_path = '' %}
15+
{% endif %}
16+
static-map=/{{ _base_path }}static={{ netbox_current_path }}/netbox/static
1217
logger={{ netbox_application_log }}
1318
req-logger={{ netbox_requests_log }}
1419

0 commit comments

Comments
 (0)