piedesaint 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/piedesaint.rb +11 -7
- data/lib/piedesaint/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: 9a67bed518cb262ac669a97ad0283f805e2b12bc
|
4
|
+
data.tar.gz: d0d02fbacbd4ee1bf4f8065d3231136e8571c848
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d7f48a002c02e4ccd3a703890a576482e69ad1d1513a42a3e40df1c93b2fae3ea999df7bf5cb934a1be5fbf576ec2c6ea9119a53ff3b12ac9184a8c8f153c3a
|
7
|
+
data.tar.gz: 67f31bf0a390ed4e4213ca9a720d8dd0214618b195a6a45529a4bc7fa8473fc7497c6cb0cdf95e7face5523e8dd17426f8813aec8ceda6033cf0cfed9ce084d6
|
data/lib/piedesaint.rb
CHANGED
@@ -75,7 +75,9 @@ module Piedesaint
|
|
75
75
|
::Rack::Builder.app do
|
76
76
|
use ::Rack::CommonLogger
|
77
77
|
use ::Rack::ShowExceptions
|
78
|
-
|
78
|
+
if ( !options[:key].nil? and !options[:key].empty? )
|
79
|
+
use ::Rack::SslEnforcer, http_port: options[:http_port], https_port: options[:https_port]
|
80
|
+
end
|
79
81
|
use ::Rack::Deflater
|
80
82
|
|
81
83
|
if options[:username].nil? or options[:username].empty?
|
@@ -118,13 +120,15 @@ module Piedesaint
|
|
118
120
|
#ctx.cert = "./server.crt"
|
119
121
|
#ctx.verify_mode = ::Puma::MiniSSL::VERIFY_NONE
|
120
122
|
|
121
|
-
ctx = ::OpenSSL::SSL::SSLContext.new
|
122
|
-
ctx.key = OpenSSL::PKey::RSA.new File.read(options[:key])
|
123
|
-
ctx.cert = OpenSSL::X509::Certificate.new File.read(options[:cert])
|
124
|
-
ctx.verify_mode = ::OpenSSL::SSL::VERIFY_NONE
|
125
|
-
|
126
123
|
puma.add_tcp_listener options[:host], options[:http_port]
|
127
|
-
|
124
|
+
|
125
|
+
if ( !options[:key].nil? and !options[:key].empty? )
|
126
|
+
ctx = ::OpenSSL::SSL::SSLContext.new
|
127
|
+
ctx.key = OpenSSL::PKey::RSA.new File.read(options[:key])
|
128
|
+
ctx.cert = OpenSSL::X509::Certificate.new File.read(options[:cert])
|
129
|
+
ctx.verify_mode = ::OpenSSL::SSL::VERIFY_NONE
|
130
|
+
puma.add_ssl_listener options[:host], options[:https_port], ctx
|
131
|
+
end
|
128
132
|
|
129
133
|
puma.min_threads = 1
|
130
134
|
puma.max_threads = 10
|
data/lib/piedesaint/version.rb
CHANGED