2015-10-26 06:09:39 +00:00
|
|
|
module RuCaptcha
|
|
|
|
class CaptchaController < ActionController::Base
|
|
|
|
def index
|
|
|
|
headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
|
|
|
|
headers['Pragma'] = 'no-cache'
|
|
|
|
|
2016-02-28 09:27:14 +00:00
|
|
|
if Gem.win_platform?
|
|
|
|
send_file generate_rucaptcha, disposition: 'inline', type: 'image/png'
|
|
|
|
else
|
|
|
|
send_data generate_rucaptcha, disposition: 'inline', type: 'image/png'
|
|
|
|
end
|
2015-10-26 06:09:39 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|