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 opts = { disposition: 'inline', type: 'image/gif' } send_data data, opts end end end