Skip to content

Commit f9b28bb

Browse files
author
Constantine Karos
committed
update get_asset_url function
- use external asset path if defined
1 parent 3402cb8 commit f9b28bb

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

dash/dash.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,11 +1185,18 @@ def csp_hashes(self, hash_algorithm="sha256"):
11851185
]
11861186

11871187
def get_asset_url(self, path):
1188-
asset = get_asset_path(
1189-
self.config.requests_pathname_prefix,
1188+
if self.config.assets_external_path:
1189+
asset = get_asset_path(
1190+
self.config.assets_external_path,
1191+
path,
1192+
self.config.assets_url_path.lstrip("/"),
1193+
)
1194+
else:
1195+
asset = get_asset_path(
1196+
self.config.requests_pathname_prefix,
11901197
path,
1191-
self.config.assets_url_path.lstrip("/"),
1192-
)
1198+
self.config.assets_url_path.lstrip("/"),
1199+
)
11931200

11941201
return asset
11951202

0 commit comments

Comments
 (0)