1 Server::Application.routes.draw do
4 # See http://guides.rubyonrails.org/routing.html
6 # OPTIONS requests are not allowed at routes that use cookies.
7 ['/auth/*a', '/login', '/logout'].each do |nono|
8 match nono, :to => 'user_sessions#cross_origin_forbidden', :via => 'OPTIONS'
10 # OPTIONS at discovery and API paths get an empty response with CORS headers.
11 match '/discovery/v1/*a', :to => 'static#empty', :via => 'OPTIONS'
12 match '/arvados/v1/*a', :to => 'static#empty', :via => 'OPTIONS'
16 resources :api_client_authorizations do
17 post 'create_system_auth', on: :collection
18 get 'current', on: :collection
20 resources :api_clients
21 resources :authorized_keys
22 resources :collections do
23 get 'provenance', on: :member
24 get 'used_by', on: :member
25 post 'trash', on: :member
28 get 'contents', on: :collection
29 get 'contents', on: :member
33 resources :containers do
34 get 'auth', on: :member
35 post 'lock', on: :member
36 post 'unlock', on: :member
37 get 'current', on: :collection
39 resources :container_requests
41 get 'queue', on: :collection
42 get 'queue_size', on: :collection
43 post 'cancel', on: :member
44 post 'lock', on: :member
46 resources :keep_disks do
47 post 'ping', on: :collection
49 resources :keep_services do
50 get 'accessible', on: :collection
55 post 'ping', on: :member
57 resources :pipeline_instances
58 resources :pipeline_templates
60 resources :repositories do
61 get 'get_all_permissions', on: :collection
65 resources :user_agreements do
66 get 'signatures', on: :collection
67 post 'sign', on: :collection
70 get 'current', on: :collection
71 get 'system', on: :collection
72 post 'activate', on: :member
73 post 'setup', on: :collection
74 post 'unsetup', on: :member
76 resources :virtual_machines do
77 get 'logins', on: :member
78 get 'get_all_logins', on: :collection
80 get '/permissions/:uuid', :to => 'links#get_permissions'
84 if Rails.env == 'test'
85 post '/database/reset', to: 'database#reset'
89 match '/auth/:provider/callback', :to => 'user_sessions#create'
90 match '/auth/failure', :to => 'user_sessions#failure'
91 # not handled by omniauth provider -> 403 with no CORS headers.
92 get '/auth/*a', :to => 'user_sessions#cross_origin_forbidden'
95 match '/login', :to => 'user_sessions#login'
96 match '/logout', :to => 'user_sessions#logout'
98 match '/discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#index'
100 match '/static/login_failure', :to => 'static#login_failure', :as => :login_failure
102 # Send unroutable requests to an arbitrary controller
103 # (ends up at ApplicationController#render_not_found)
104 match '*a', :to => 'static#render_not_found'
106 root :to => 'static#home'