Browse Source

Fixed content type of auto generated javascript

pull/2/head
clerie 2 years ago
parent
commit
f02cd19e69
  1. 5
      wetter/views.py

5
wetter/views.py

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

Loading…
Cancel
Save