traptcha 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
@@ -3,15 +3,16 @@ class Traptcha::CaptchasController < ApplicationController
|
|
3
3
|
|
4
4
|
def show
|
5
5
|
session[:captcha] = generated_captcha.value
|
6
|
-
|
6
|
+
|
7
|
+
send_data generated_captcha.to_png, :disposition => 'inline', :type => 'image/png'
|
7
8
|
end
|
8
9
|
|
9
10
|
protected
|
10
|
-
|
11
|
+
|
11
12
|
def set_cache_buster
|
12
|
-
response.headers[
|
13
|
-
response.headers[
|
14
|
-
response.headers[
|
13
|
+
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
|
14
|
+
response.headers['Pragma'] = 'no-cache'
|
15
|
+
response.headers['Expires'] = 'Fri, 01 Jan 1990 00:00:00 GMT'
|
15
16
|
end
|
16
17
|
|
17
18
|
def generated_captcha
|
data/lib/traptcha/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traptcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 12
|
10
|
+
version: 0.0.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rodrigo Navarro
|