diff --git a/python_modules/dagster-webserver/dagster_webserver/webserver.py b/python_modules/dagster-webserver/dagster_webserver/webserver.py index 463467613555b..8ccc54cda00ef 100644 --- a/python_modules/dagster-webserver/dagster_webserver/webserver.py +++ b/python_modules/dagster-webserver/dagster_webserver/webserver.py @@ -248,7 +248,7 @@ def _static_file(path, file_path): full_path = path.join(subdir, file) relative_path = "/" + full_path[len(base_dir) :].lstrip(path.sep) # We only need to replace BUILDTIME_ASSETPREFIX_REPLACE_ME in javascript files - if file.endswith(".js") or file.endswith(".js.map"): + if self._app_path_prefix and (file.endswith(".js") or file.endswith(".js.map")): routes.append(_next_static_file(relative_path, full_path)) else: routes.append(_static_file(relative_path, full_path))