summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 9a589828221..234825480f2 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -336,9 +336,9 @@ module API
env['warden']
end
- # Check if CSRF tokens are valid.
+ # Check if the request is GET/HEAD, or if CSRF token is valid.
def verified_request?
- Gitlab::RequestForgeryProtection.call(env) rescue false
+ Gitlab::RequestForgeryProtection.verified?(env)
end
# Check the Rails session for valid authentication details