Skip to content

Commit

Permalink
typo in hsts variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mkristian committed Apr 6, 2011
1 parent c3079c8 commit a94bde0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
1 change: 0 additions & 1 deletion enforce-ssl-gem/Mavenfile
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
properties['jruby.plugins.version'] = '0.26.0-SNAPSHOT'
2 changes: 1 addition & 1 deletion enforce-ssl-gem/enforce-ssl.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'enforce-ssl'
s.version = '0.3.0'
s.version = '0.2.2'

s.summary = 'enforce the use of SSL for all controller actions'
s.description = 'enforce the use of SSL for all controller actions, skip the enforcement with skip_before_filter :enforce_ssl for selected actions. moto: secure everything, open where needed'
Expand Down
17 changes: 3 additions & 14 deletions enforce-ssl-gem/enforce-ssl.gemspec.pom
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>rubygems</groupId>
<artifactId>enforce-ssl</artifactId>
<version>0.3.0</version>
<version>0.2.2</version>
<name><![CDATA[enforce the use of SSL for all controller actions]]></name>
<packaging>gem</packaging>
<description><![CDATA[enforce the use of SSL for all controller actions, skip the enforcement with skip_before_filter :enforce_ssl for selected actions. moto: secure everything, open where needed]]></description>
Expand All @@ -27,18 +27,6 @@
<url>http://gems.saumya.de/releases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonatype-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>rubygems</groupId>
Expand All @@ -51,12 +39,13 @@
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>1.5.6</version>
<type>jar</type>
</dependency>
</dependencies>
<properties>
<gem.home>${project.build.directory}/rubygems</gem.home>
<gem.path>${project.build.directory}/rubygems</gem.path>
<jruby.plugins.version>0.26.0-SNAPSHOT</jruby.plugins.version>
<jruby.plugins.version>0.26.0</jruby.plugins.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
Expand Down
2 changes: 1 addition & 1 deletion enforce-ssl-gem/lib/enforce_ssl/enforce_ssl_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def enforce_ssl
# use only if max_age is set and only in production mode since it
# needs a proper (not self-signed) certificate
if Rails.configuration.hsts_max_age && Rails.env == "production"
subdomain = Rails.configuration.hsts_include_sub_domains? ? " ; includeSubDomains" : ""
subdomain = Rails.configuration.hsts_include_sub_domain == true ? " ; includeSubDomains" : ""
controller. response.headers['Strict-Transport-Security'] = "max-age=#{Rails.configuration.hsts_max_age.to_i}" + subdomain

end
Expand Down
2 changes: 1 addition & 1 deletion enforce-ssl-gem/lib/enforce_ssl/enforce_ssl_rack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def call(env)
# use only if max_age is set and only in production mode since it
# needs a proper (not self-signed) certificate
if Rails.configuration.hsts_max_age && Rails.env == "production"
subdomain = Rails.configuration.hsts_include_sub_domains? ? " ; includeSubDomains" : ""
subdomain = Rails.configuration.hsts_include_sub_domain == true ? " ; includeSubDomains" : ""
@headers['Strict-Transport-Security'] = "max-age=#{Rails.configuration.hsts_max_age.to_i}" + subdomain

end
Expand Down

0 comments on commit a94bde0

Please sign in to comment.