Fix non-existent .js requests raising DoubleRenderError.
Fix requests for non-existent .js pages, for example https://danbooru.donmai.us/oaisfj.js, raising AbstractController::DoubleRenderError when trying to render the 404 response.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
class StaticController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
skip_forgery_protection only: :not_found, if: -> { request.format.js? }
|
||||
|
||||
def privacy_policy
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user