File tree 2 files changed +5
-2
lines changed
Filter options
2 files changed +5
-2
lines changed
Original file line number Diff line number Diff line change @@ -154,7 +154,10 @@ async def web_module_files(
154
154
_ : str = "" , # this is not used
155
155
) -> response .HTTPResponse :
156
156
path = urllib_parse .unquote (path )
157
- return await response .file (safe_web_modules_dir_path (path ))
157
+ return await response .file (
158
+ safe_web_modules_dir_path (path ),
159
+ mime_type = "text/javascript" ,
160
+ )
158
161
159
162
blueprint .add_route (web_module_files , "/_api/modules/<path:path>" )
160
163
blueprint .add_route (web_module_files , "/<_:path>/_api/modules/<path:path>" )
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def _setup_common_routes(options: Options, app: Starlette) -> None:
126
126
127
127
if options .serve_static_files :
128
128
wm_dir = IDOM_WEB_MODULES_DIR .current
129
- web_module_files = StaticFiles (directory = wm_dir , html = True , check_dir = False )
129
+ web_module_files = StaticFiles (directory = wm_dir , check_dir = False )
130
130
app .mount (url_prefix + "/_api/modules" , web_module_files )
131
131
app .mount (url_prefix + "/{_:path}/_api/modules" , web_module_files )
132
132
You can’t perform that action at this time.
0 commit comments