diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hydrilla/server/serve.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py index e6ba484..4e2eb00 100644 --- a/src/hydrilla/server/serve.py +++ b/src/hydrilla/server/serve.py @@ -141,7 +141,11 @@ def get_resource_or_mapping(item_type: str, identifier: str) \ # no need for send_from_directory(); path is safe, constructed by us info_path = f'{info.identifier}/{versions.version_string(info.version)}' file_path = get_malcontent().malcontent_dir_path / item_type / info_path - return flask.send_file(open(file_path, 'rb'), mimetype='application/json') + return flask.send_file( + str(file_path), + mimetype = 'application/json', + etag = False + ) @bp.route('/mapping/<string:identifier_dot_json>') def get_newest_mapping(identifier_dot_json: str) -> werkzeug.Response: |