Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Allow dashes in sumofus.org subdomains
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Martinez committed Aug 9, 2016
1 parent 3ee1ce5 commit cd564a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/environments/production.rb
Expand Up @@ -122,11 +122,11 @@
# In production, we only accept CORS request from sumofus.org or its subdomains.
config.middleware.insert_before 0, 'Rack::Cors', logger: (-> { Rails.logger }) do
allow do
origins(/^(https?:\/\/)?([a-z0-9]+\.)?sumofus\.org$/i)
origins(/^(https?:\/\/)?([a-z0-9-]+\.)?sumofus\.org$/i)
resource '*',
headers: :any,
methods: [:get, :post, :delete, :put, :patch, :options, :head],
max_age: 86400
max_age: 86_400
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions config/environments/test.rb
Expand Up @@ -56,11 +56,11 @@
# CORS
config.middleware.insert_before 0, 'Rack::Cors', logger: (-> { Rails.logger }) do
allow do
origins(/^(https?:\/\/)?([a-z0-9]+\.)?sumofus\.org$/i)
origins(/^(https?:\/\/)?([a-z0-9-]+\.)?sumofus\.org$/i)
resource '*',
headers: :any,
methods: [:get, :post, :delete, :put, :patch, :options, :head],
max_age: 86400
max_age: 86_400
end
end
end
Expand Down

0 comments on commit cd564a5

Please sign in to comment.