minimum_viable_product 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/ssl.rb +11 -2
- data/lib/minimum_viable_product/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 382c97c15499f1cc581505110e8eee150118765f
|
4
|
+
data.tar.gz: 8839d176c765df3f2633c2750875dd63f8e0a054
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc3632f643f75de65320e57ddff621424209712fb2172151a7056d5a11719ac1c8bf904b0ebd3ebe143fe9ee2707fcf221d85f9080940394344f5f17811915ed
|
7
|
+
data.tar.gz: fff37898e1d151cf29af6c0fd02ca447ae0e6431f13b783be976fd54fc40eda9d6e605ba4e5c46ea7a5822e8db3fdfefa0ca85852c9e084943552c7e471b3813
|
data/config/initializers/ssl.rb
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
case ENV['FORCE_SSL']
|
2
|
+
when /t|true|yes|y|on/
|
3
|
+
Rails.application.config.middleware.use SslEnforcerOnlyProtocol, :https_port => ENV['HOST_PORT']
|
3
4
|
end
|
5
|
+
|
6
|
+
BEGIN {
|
7
|
+
class SslEnforcerOnlyProtocol < Rack::SslEnforcer
|
8
|
+
def current_scheme
|
9
|
+
@request.scheme == 'https'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
}
|