diff options
author | Valery Sizov <valery@gitlab.com> | 2017-07-27 18:14:09 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-07-27 18:14:09 +0300 |
commit | 3d83181b81b9ef54a0b310e6ce2eabc7660a0040 (patch) | |
tree | 8dd41b990e6b0dc4fc6f6ebc603372fa3e03f2f9 /lib/gitlab/devise_failure.rb | |
parent | eaceee0fb9e23982571c9c2a878d662ba241240e (diff) |
Remove GitLab custom fealure app for devise
Diffstat (limited to 'lib/gitlab/devise_failure.rb')
-rw-r--r-- | lib/gitlab/devise_failure.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/gitlab/devise_failure.rb b/lib/gitlab/devise_failure.rb deleted file mode 100644 index a78fde9d782..00000000000 --- a/lib/gitlab/devise_failure.rb +++ /dev/null @@ -1,23 +0,0 @@ -module Gitlab - class DeviseFailure < Devise::FailureApp - protected - - # Override `Devise::FailureApp#request_format` to handle a special case - # - # This tells Devise to handle an unauthenticated `.zip` request as an HTML - # request (i.e., redirect to sign in). - # - # Otherwise, Devise would respond with a 401 Unauthorized with - # `Content-Type: application/zip` and a response body in plaintext, and the - # browser would freak out. - # - # See https://gitlab.com/gitlab-org/gitlab-ce/issues/12944 - def request_format - if request.format == :zip - Mime::Type.lookup_by_extension(:html).ref - else - super - end - end - end -end |