Avoid ActionView::MissingTemplate occurred in sessions#new
Some browser request /:foodcoop/login with the HTTP-Accept-Header set to "image/webp,image/*;q=0.8", which leads to an internal server error due to a not existing template. Call respond_to to allow only html and respond with the correct "406 Not Acceptable" HTTP status code.
This commit is contained in:
parent
7e88798778
commit
8c6d48da86
1 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,9 @@ class SessionsController < ApplicationController
|
|||
layout 'login'
|
||||
|
||||
def new
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
Loading…
Reference in a new issue