Merge branch 'atomaka/bugfix/staging-api' into 'master'
Allow api subdomain on staging to work too in staging, the subdomain becomes 'api.staging' and 'api' will not match. We can resolve this with a regex: `/^api(\.|$)/`. There is a configuration setting, `config.action_dispatch.tld_length` that could resolve this as well. Typically, I imagine this being set by environment, but since Heroku suggests running all Rails apps as production, even if it is a different environment, this isn't really an option. See merge request !24
This commit is contained in:
commit
3a80191239
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ Rails.application.routes.draw do
|
|||
resources :versions, only: [:show]
|
||||
end
|
||||
|
||||
constraints subdomain: 'api' do
|
||||
constraints subdomain: /^api(\.|$)/ do
|
||||
namespace :api, path: nil do
|
||||
namespace :v1 do
|
||||
resources :cards, only: [:index, :show]
|
||||
|
|
Loading…
Reference in a new issue