Fix content type for app.js

This commit is contained in:
Piero Toffanin 2023-01-10 10:02:12 -05:00
parent e45d27d9ce
commit f1f0753cd4
2 changed files with 3 additions and 3 deletions

View file

@ -302,9 +302,9 @@ def create_app(args):
if args.disable_web_ui:
abort(404)
return render_template("app.js.template",
return Response(render_template("app.js.template",
url_prefix=args.url_prefix,
get_api_key_link=args.get_api_key_link)
get_api_key_link=args.get_api_key_link), content_type='application/javascript; charset=utf-8')
@bp.get("/languages")
@limiter.exempt

View file

@ -97,7 +97,7 @@
var btnChangeLangs = document.getElementsByClassName("change-language");
var localePanels = document.getElementsByClassName("locale-panel");
console.log(btnChangeLangs);
for (var i = 0; i < btnChangeLangs.length; i++){
(function(btn){
btn.addEventListener('click', function(e){