Fix flask backend mimetype for modules (#1131)

* Fix flask backend mimetype for modules

* Update changelog

---------

Co-authored-by: Ryan Morshead <ryan.morshead@gmail.com>
This commit is contained in:
Dekkorate 2023-10-22 22:14:47 +03:00 committed by GitHub
parent d3959e4e39
commit 701e462f61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -26,6 +26,7 @@ Unreleased
**Fixed**
- :pull:`1118` - `module_from_template` is broken with a recent release of `requests`
- :pull:`1131` - `module_from_template` did not work when using Flask backend
v1.0.2

View file

@ -165,7 +165,7 @@ def _setup_common_routes(
@api_blueprint.route(f"/{MODULES_PATH.name}/<path:path>")
def send_modules_dir(path: str = "") -> Any:
return send_file(safe_web_modules_dir_path(path))
return send_file(safe_web_modules_dir_path(path), mimetype="text/javascript")
index_html = read_client_index_html(options)