summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-06-20 15:53:05 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-06-20 15:53:23 +0200
commit15b7b9ec4117bf19168ea0f923ea11e926edcc5c (patch)
tree76c9092445c3619d343c810541e49a84522624b1 /app/controllers/application_controller.rb
parent57ff963129a37b27f3944f0ec2d0212da9b23e84 (diff)
downloadgitlab-ce-15b7b9ec4117bf19168ea0f923ea11e926edcc5c.tar.gz
Add rescue_from(ActionController::UnknownFormat) in Application Controller
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 91694ebcd1d..824ce845706 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -40,6 +40,10 @@ class ApplicationController < ActionController::Base
render_404
end
+ rescue_from(ActionController::UnknownFormat) do
+ render_404
+ end
+
rescue_from Gitlab::Access::AccessDeniedError do |exception|
render_403
end