From d2eb0d2c708a00a60dbf563320d039c257c3d734 Mon Sep 17 00:00:00 2001 From: anonymousratwastaken Date: Thu, 23 Apr 2026 18:38:52 +0100 Subject: [PATCH] Migrate ATProto DID endpoint to app router --- next.config.ts | 9 +-------- src/app/.well-known/atproto-did/route.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 src/app/.well-known/atproto-did/route.ts diff --git a/next.config.ts b/next.config.ts index 795be24..6b74c70 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,14 +1,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - async rewrites() { - return [ - { - source: '/.well-known/atproto-did', - destination: 'https://pds.frg.network/.well-known/atproto-did', - } - ] - } + } export default nextConfig; diff --git a/src/app/.well-known/atproto-did/route.ts b/src/app/.well-known/atproto-did/route.ts new file mode 100644 index 0000000..8d07d69 --- /dev/null +++ b/src/app/.well-known/atproto-did/route.ts @@ -0,0 +1,9 @@ +export async function GET() { + const res = await fetch('https://pds.frg.network/.well-known/atproto-did', { + headers: { Host: 'frg.network' }, + }) + const text = await res.text() + return new Response(text, { + headers: { 'Content-Type': 'text/plain' }, + }) +}