add mcp
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { env } from "@zendegi/env/server";
|
||||
|
||||
export const Route = createFileRoute("/.well-known/oauth-protected-resource")({
|
||||
server: {
|
||||
handlers: {
|
||||
GET: () => {
|
||||
const baseUrl = env.BETTER_AUTH_URL.replace(/\/api\/auth$/, "");
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
resource: baseUrl,
|
||||
authorization_servers: [`${baseUrl}/api/auth`],
|
||||
bearer_methods_supported: ["header"],
|
||||
}),
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Cache-Control":
|
||||
"public, max-age=15, stale-while-revalidate=15, stale-if-error=86400",
|
||||
},
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user