Fixes #577.
Showing the changes to lib (1 of 3 files). Show all
Unified · Split
| @@ -229,6 +229,7 @@ class App < Sinatra::Application · 228 unmodified lines | |||
| 229 | end | 229 | end |
| 230 | 230 | ||
| 231 | get '/' do | 231 | get '/' do |
| 232 | return redirect "/#q=#{params[:q]}" if params[:q] | ||
| 232 | return redirect '/' unless request.query_string.empty? # courtesy of HTML5 App Cache | 233 | return redirect '/' unless request.query_string.empty? # courtesy of HTML5 App Cache |
| 233 | response.headers['Content-Security-Policy'] = settings.csp if settings.csp | 234 | response.headers['Content-Security-Policy'] = settings.csp if settings.csp |
| 234 | erb :index | 235 | erb :index |