Fixup Routes: properly handle custom domains, add /events/:id alias
This commit is contained in:
parent
b41b77c676
commit
71eb408620
1 changed files with 5 additions and 4 deletions
|
|
@ -167,6 +167,7 @@ Osem::Application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
resource :program, only: [] do
|
resource :program, only: [] do
|
||||||
|
get 'event/:id', to: 'proposals#show', as: :conference_program_event
|
||||||
get 'proposal/:id', to: 'proposals#show' # For backward compatibility
|
get 'proposal/:id', to: 'proposals#show' # For backward compatibility
|
||||||
resources :proposals, except: :destroy do
|
resources :proposals, except: :destroy do
|
||||||
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
||||||
|
|
@ -222,15 +223,15 @@ Osem::Application.routes.draw do
|
||||||
|
|
||||||
get '/admin' => redirect('/admin/conferences')
|
get '/admin' => redirect('/admin/conferences')
|
||||||
|
|
||||||
|
constraints DomainConstraint do
|
||||||
|
root to: 'conferences#show'
|
||||||
|
end
|
||||||
|
|
||||||
unless ENV['OSEM_ROOT_CONFERENCE'].blank?
|
unless ENV['OSEM_ROOT_CONFERENCE'].blank?
|
||||||
root to: redirect("/conferences/#{ENV['OSEM_ROOT_CONFERENCE']}")
|
root to: redirect("/conferences/#{ENV['OSEM_ROOT_CONFERENCE']}")
|
||||||
else
|
else
|
||||||
root to: 'conferences#index', via: [:get, :options]
|
root to: 'conferences#index', via: [:get, :options]
|
||||||
end
|
end
|
||||||
|
|
||||||
constraints DomainConstraint do
|
|
||||||
root to: 'conferences#show'
|
|
||||||
end
|
|
||||||
|
|
||||||
get '/.well-known/apple-developer-merchantid-domain-association', to: 'application#apple_pay'
|
get '/.well-known/apple-developer-merchantid-domain-association', to: 'application#apple_pay'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue