Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AWS S3 website endpoint validations #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
roadworker
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-2.6
2 changes: 1 addition & 1 deletion lib/roadworker/route53-ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def dns_name_to_alias_target(name, options, hosted_zone_id, hosted_zone_name)
# NLB
region = $1.downcase
alias_target = nlb_dns_name_to_alias_target(name, region, options)
elsif (s3_hosted_zone_id = S3_WEBSITE_ENDPOINTS[name.downcase]) and name =~ /\As3-website-([^.]+)\.amazonaws\.com\z/i
elsif (s3_hosted_zone_id = S3_WEBSITE_ENDPOINTS[name.downcase]) and name =~ /\As3-website[.-]([^.]+)\.amazonaws\.com\z/i
region = $1.downcase
s3_dns_name_to_alias_target(name, region, s3_hosted_zone_id)
elsif name =~ /\.cloudfront\.net\z/i
Expand Down