ssl_routes 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ssl_routes/paperclip.rb +2 -3
- data/lib/ssl_routes/version.rb +1 -1
- metadata +3 -3
data/lib/ssl_routes/paperclip.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Pollute Thread.current so we can fix S3 urls.
|
2
2
|
ActionController::Base.class_eval do
|
3
|
-
|
3
|
+
before_filter :set_protocol
|
4
4
|
private
|
5
5
|
def set_protocol
|
6
6
|
Thread.current[:protocol] = request && request.ssl? ? 'https' : 'http'
|
@@ -8,9 +8,8 @@ ActionController::Base.class_eval do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
# Fix protocol in S3 urls.
|
11
|
-
Paperclip::Storage::S3
|
11
|
+
module Paperclip::Storage::S3
|
12
12
|
def s3_protocol
|
13
|
-
debugger
|
14
13
|
Thread.current[:protocol] ||= @s3_protocol
|
15
14
|
end
|
16
15
|
end
|
data/lib/ssl_routes/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssl_routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Cedric Howe
|