mirror of
https://github.com/versia-pub/server.git
synced 2025-12-07 16:58:20 +01:00
25 lines
572 B
TypeScript
25 lines
572 B
TypeScript
import { apiRoute, applyConfig } from "@/api";
|
|
import { redirect } from "@/response";
|
|
import { config } from "~/packages/config-manager";
|
|
|
|
export const meta = applyConfig({
|
|
allowedMethods: ["GET"],
|
|
auth: {
|
|
required: false,
|
|
},
|
|
ratelimits: {
|
|
duration: 60,
|
|
max: 60,
|
|
},
|
|
route: "/.well-known/nodeinfo",
|
|
});
|
|
|
|
export default apiRoute((app) =>
|
|
app.on(meta.allowedMethods, meta.route, () => {
|
|
return redirect(
|
|
new URL("/.well-known/nodeinfo/2.0", config.http.base_url),
|
|
301,
|
|
);
|
|
}),
|
|
);
|