rails_pwnerer 0.7.0 → 0.7.1

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.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.7.1. Allow SSL apps to listen on non-SSL port as well.
2
+
1
3
  v0.7.0. New config layout facilitates having per-host configs in separate repository.
2
4
 
3
5
  v0.6.109. Allow .crt for SSL certificate chains.
@@ -35,8 +35,10 @@ class RailsPwnerer::App::Config
35
35
  app_db[:dns_name] ||= ''
36
36
  # the environment to run the application in
37
37
  app_db[:environment] ||= 'production'
38
- # a port for server-based filtering (multiple apps on the same box)
38
+ # main port where the application receives HTTP(S) outside connections
39
39
  app_db[:port] ||= 80
40
+ # HTTPS applications also accept HTTP connections here, unless 0
41
+ app_db[:non_ssl_port] ||= 80
40
42
  # the maximum request size (megabytes) to be accepted by an application
41
43
  app_db[:max_request_mb] ||= 48
42
44
  # comma-separated directories that should be writable by the application user
@@ -87,6 +89,7 @@ class RailsPwnerer::App::Config
87
89
  app_config[:ssl_cert] = ssl_cert
88
90
  app_config[:ssl_key] = ssl_key
89
91
  app_config[:port] = 443
92
+ app_config[:non_ssl_port] = 80
90
93
  end
91
94
 
92
95
  ["config/rails_pwnerer.yml", "config/rails_pwnerer/#{instance_name}.yml"].each do |fname|
@@ -32,6 +32,7 @@ class RailsPwnerer::App::NginxConfig
32
32
  f << <<NGINX_CONFIG
33
33
  server {
34
34
  listen #{app_port}#{app_config[:ssl_key] ? ' ssl' : ''};
35
+ #{(app_config[:ssl_key] && app_config[:non_ssl_port] != 0) ? "listen #{app_config[:non_ssl_port]}" : "" }
35
36
  charset utf-8;
36
37
  #{app_config[:ssl_key] ? 'ssl on;' : ''}
37
38
  #{app_config[:ssl_key] ? "ssl_certificate #{app_config[:ssl_cert]};" : ''}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rails_pwnerer"
5
- s.version = "0.7.0"
5
+ s.version = "0.7.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: