diff --git a/.gitignore b/.gitignore index 5a170c3..bc45c3f 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ /scripts /.idea /.run +/data diff --git a/config/routes/e621_ws_routes.rb b/config/routes/e621_ws_routes.rb index 48cb97c..70daf68 100644 --- a/config/routes/e621_ws_routes.rb +++ b/config/routes/e621_ws_routes.rb @@ -8,6 +8,10 @@ module E621WsRoutes def self.extended(router) router.instance_exec do namespace(:e621_ws, path: "") do + constraints(DomainConstraint.new(DOMAIN)) do + root(to: redirect("https://#{STATUS_DOMAIN}")) + end + constraints(DomainConstraint.new(DOMAIN, STATUS)) do resource(:json, only: %i[index current history]) do get(:index, controller: :status, defaults: { format: :json }) @@ -31,9 +35,9 @@ module E621WsRoutes get(:manifest, constraints: { format: "json" }) get(:browserconfig, constraints: { format: "xml" }) + root(action: :index) end - root(to: "status#index") end end end