Skip to content

Commit

Permalink
Merge pull request #1 from AminAlam/cache_timeout_removed
Browse files Browse the repository at this point in the history
cache_timeout arg removed from send_file
  • Loading branch information
AminAlam committed Feb 28, 2023
2 parents fe8a7b9 + a533022 commit 9435225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flaskcode/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def resource_data(file_path):
file_path = os.path.join(g.flaskcode_resource_basepath, file_path)
if not (os.path.exists(file_path) and os.path.isfile(file_path)):
abort(404)
response = send_file(file_path, mimetype='text/plain', cache_timeout=0)
response = send_file(file_path, mimetype='text/plain')
mimetype, encoding = mimetypes.guess_type(file_path, False)
if mimetype:
response.headers.set('X-File-Mimetype', mimetype)
Expand Down

0 comments on commit 9435225

Please sign in to comment.