From 3092f83c8bd6900adb5956ad307f54654c480598 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Sat, 23 Jul 2022 11:10:55 +0200 Subject: [PATCH] Serve the search JS with the correct mimetype --- digimarks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/digimarks.py b/digimarks.py index 3f9a79f..9d72588 100644 --- a/digimarks.py +++ b/digimarks.py @@ -605,10 +605,12 @@ def bookmarks_js(userkey): Bookmark.userkey == userkey, Bookmark.status == Bookmark.VISIBLE ).order_by(Bookmark.created_date.desc()) - return render_template( + resp = make_response(render_template( 'bookmarks.js', bookmarks=bookmarks - ) + )) + resp.headers['Content-type'] = 'text/javascript; charset=utf-8' + return resp @app.route('/r//')