Migrate ATProto DID endpoint to app router

This commit is contained in:
anonymousratwastaken 2026-04-23 18:38:52 +01:00
parent 110d2cddb2
commit d2eb0d2c70
2 changed files with 10 additions and 8 deletions

View file

@ -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;

View file

@ -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' },
})
}