Skip to content

Commit

Permalink
Stop checking for a specific list of hosts for EC2 endpoints when the…
Browse files Browse the repository at this point in the history
… user specifies a specific EC2_URL env var. User is responsible for specifying the correct endpoint.
  • Loading branch information
grempe committed Jun 10, 2010
1 parent 2949a00 commit a79484c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/AWS/EC2.rb
Expand Up @@ -8,8 +8,6 @@ module EC2
# export EC2_URL='https://ec2.amazonaws.com'
if ENV['EC2_URL']
EC2_URL = ENV['EC2_URL']
VALID_HOSTS = ['https://ec2.amazonaws.com', 'https://us-east-1.ec2.amazonaws.com', 'https://us-west-1.ec2.amazonaws.com', 'https://eu-west-1.ec2.amazonaws.com']
raise ArgumentError, "Invalid EC2_URL environment variable : #{EC2_URL}" unless VALID_HOSTS.include?(EC2_URL.chomp('/'))
DEFAULT_HOST = URI.parse(EC2_URL).host
else
# Default US API endpoint
Expand Down

0 comments on commit a79484c

Please sign in to comment.