Fixed content type of auto generated javascript

This commit is contained in:
clerie 2020-04-06 18:57:19 +02:00
parent 1550f21382
commit f02cd19e69
1 changed files with 4 additions and 1 deletions

View File

@ -78,4 +78,7 @@ def dyn_stations_js():
else: else:
stations = Stations.query.order_by(Stations.dwd_id.asc()).all() stations = Stations.query.order_by(Stations.dwd_id.asc()).all()
return render_template('dyn/stations.js', stations=stations) r = make_response(render_template('dyn/stations.js', stations=stations))
r.headers['Content-Type'] = 'application/javascript; charset=utf-8'
return r