diff options
| author | Tradam <[email protected]> | 2024-05-16 15:22:12 -0400 |
|---|---|---|
| committer | Tradam <[email protected]> | 2024-05-16 15:22:12 -0400 |
| commit | 6ae14ae3a10d79e5f0b70b1b1af74e8a3507bb83 (patch) | |
| tree | ef5ed5e9277dc3c69cc938634ac1351920b91ad8 /config/routes.rb | |
| parent | 519568969b9ff3a47e595073a40fef099586e3c9 (diff) | |
| download | gameHolster-6ae14ae3a10d79e5f0b70b1b1af74e8a3507bb83.tar.gz gameHolster-6ae14ae3a10d79e5f0b70b1b1af74e8a3507bb83.zip | |
isolate serving of user HTML files to a seperate domain
Diffstat (limited to 'config/routes.rb')
| -rw-r--r-- | config/routes.rb | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/config/routes.rb b/config/routes.rb index cc5e70e..e89c5c0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,25 +2,32 @@ Rails.application.routes.draw do namespace :api do namespace :v1 do - # USERS - get 'users/index', to: 'users#index' - #get 'users/new' - #get 'users/create' - #get 'users/delete' + # isolated domain, do not allow auth here + constraints domain: 'localhost' do + # GAMES + get 'games/*path/:file', to: 'games#index' + end - # GAMES - get 'games/*path/:file', to: 'games#index' - #resources :games + constraints domain: "127.0.0.1" do + # USERS + get 'users/index', to: 'users#index' + #get 'users/new' + #get 'users/create' + #get 'users/delete' - # BLOGS - get 'blogs/index', to: 'blog#index' - post 'blogs/create', to: 'blog#create' - get '/show/:id', to: 'blog#show' - delete '/destroy/:id', to: 'blog#destroy' + # GAMES + #resources :games - # AUTH - get 'auth/callback', to: 'auth#callback' - get 'auth/data', to: 'auth#data' + # BLOGS + get 'blogs/index', to: 'blog#index' + post 'blogs/create', to: 'blog#create' + get '/show/:id', to: 'blog#show' + delete '/destroy/:id', to: 'blog#destroy' + + # AUTH + get 'auth/callback', to: 'auth#callback' + get 'auth/data', to: 'auth#data' + end end end root 'homepage#index' |
