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

View File

@ -78,4 +78,7 @@ def dyn_stations_js():
else:
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