Skip to content

Commit

Permalink
https
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Aug 7, 2018
1 parent fe0c043 commit 8028f32
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .ebextensions/https.config
@@ -0,0 +1,20 @@
# First create an ACM cert, then uncomment this and update the ARN.
# Launch with SSL_ENFORCER_HOST=rssbox.example.com to redirect to https.
# ALB is a little bit cheaper than ELB.

# SSL configuration for use with Application Load Balancer:

# option_settings:
# aws:elbv2:listener:443:
# Protocol: HTTPS
# SSLCertificateArns: arn:aws:acm:us-west-2:012345678901:certificate/12345678-12ab-34cd-56ef-123456789012


# SSL configuration for use with Classic Load Balancer:

# option_settings:
# aws:elb:listener:443:
# ListenerProtocol: HTTPS
# SSLCertificateId: arn:aws:acm:us-west-2:012345678901:certificate/12345678-12ab-34cd-56ef-123456789012
# InstancePort: 80
# InstanceProtocol: HTTP
2 changes: 1 addition & 1 deletion config/application.rb
Expand Up @@ -9,7 +9,7 @@
# set :environment, :production

configure do
use Rack::SslEnforcer, only_hosts: /\.herokuapp\.com$/
use Rack::SslEnforcer, only_hosts: (ENV["SSL_ENFORCER_HOST"] || /\.herokuapp\.com$/)
use SecureHeaders::Middleware
set :erb, trim: "-"
# Look up Rack::Mime::MIME_TYPES to see rack defaults
Expand Down

0 comments on commit 8028f32

Please sign in to comment.