redirect e621.ws root

This commit is contained in:
Donovan Daniels 2024-05-03 00:41:38 -05:00
parent d359f10133
commit e7518a5c0f
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -42,3 +42,4 @@
/scripts /scripts
/.idea /.idea
/.run /.run
/data

View File

@ -8,6 +8,10 @@ module E621WsRoutes
def self.extended(router) def self.extended(router)
router.instance_exec do router.instance_exec do
namespace(:e621_ws, path: "") do namespace(:e621_ws, path: "") do
constraints(DomainConstraint.new(DOMAIN)) do
root(to: redirect("https://#{STATUS_DOMAIN}"))
end
constraints(DomainConstraint.new(DOMAIN, STATUS)) do constraints(DomainConstraint.new(DOMAIN, STATUS)) do
resource(:json, only: %i[index current history]) do resource(:json, only: %i[index current history]) do
get(:index, controller: :status, defaults: { format: :json }) get(:index, controller: :status, defaults: { format: :json })
@ -31,9 +35,9 @@ module E621WsRoutes
get(:manifest, constraints: { format: "json" }) get(:manifest, constraints: { format: "json" })
get(:browserconfig, constraints: { format: "xml" }) get(:browserconfig, constraints: { format: "xml" })
root(action: :index)
end end
root(to: "status#index")
end end
end end
end end