summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb
index b152c9c..d3d2cec 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -3,8 +3,11 @@ LeapWeb::Application.routes.draw do
# Please do not use root_path or root_url. Use home_path and home_url instead,
# so that the path will be correctly prefixed with the locale.
#
- root :to => "home#index"
- get '(:locale)' => 'home#index', :locale => CommonLanguages.match_available, :as => 'home'
+
+ scope format: 'html' do
+ root :to => "home#index"
+ get '(:locale)' => 'home#index', :locale => CommonLanguages.match_available, :as => 'home'
+ end
#
# HTTP Error Handling
@@ -58,6 +61,8 @@ LeapWeb::Application.routes.draw do
get "/.well-known/host-meta" => 'webfinger#host_meta'
get "/webfinger" => 'webfinger#search'
- get "/key/:login" => 'keys#show'
+ get "/key/:login" => 'keys#show',
+ :constraints => { :login => /[^\/]+/ },
+ :defaults => { :format => :text }
end