From 0c16db552e2217a55bc85734e9e8a540c8cbd2fe Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 9 Mar 2017 16:42:43 +0800 Subject: [PATCH] Do not handle with HEAD method --- app/controllers/ru_captcha/captcha_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/ru_captcha/captcha_controller.rb b/app/controllers/ru_captcha/captcha_controller.rb index a77ecea..591e027 100644 --- a/app/controllers/ru_captcha/captcha_controller.rb +++ b/app/controllers/ru_captcha/captcha_controller.rb @@ -1,6 +1,7 @@ module RuCaptcha class CaptchaController < ActionController::Base def index + return head :ok if request.head? headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate' headers['Pragma'] = 'no-cache' data = generate_rucaptcha