Skip to content

Commit cc2b065

Browse files
committed
Add requests_pathname_prefix init arg.
1 parent 3812af0 commit cc2b065

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: dash/dash.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def __init__(
7373
assets_url_path='/assets',
7474
include_assets_files=True,
7575
url_base_pathname='/',
76+
requests_pathname_prefix='',
7677
compress=True,
7778
meta_tags=None,
7879
index_string=_default_index,
@@ -105,10 +106,10 @@ def __init__(
105106
self.config = _AttributeDict({
106107
'suppress_callback_exceptions': False,
107108
'routes_pathname_prefix': url_base_pathname,
108-
'requests_pathname_prefix': os.getenv(
109+
'requests_pathname_prefix': requests_pathname_prefix or os.getenv(
109110
'DASH_REQUESTS_PATHNAME_PREFIX',
110-
'/{}/'.format(os.environ['DASH_APP_NAME'])
111-
if 'DASH_APP_NAME' in os.environ else url_base_pathname),
111+
'/{}'.format(os.environ['DASH_APP_NAME'])
112+
if 'DASH_APP_NAME' in os.environ else '') + url_base_pathname,
112113
'include_assets_files': include_assets_files,
113114
'assets_external_path': '',
114115
})

0 commit comments

Comments
 (0)