Migrate ATProto DID endpoint to app router
This commit is contained in:
parent
110d2cddb2
commit
d2eb0d2c70
2 changed files with 10 additions and 8 deletions
|
|
@ -1,14 +1,7 @@
|
||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
async rewrites() {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: '/.well-known/atproto-did',
|
|
||||||
destination: 'https://pds.frg.network/.well-known/atproto-did',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|
|
||||||
9
src/app/.well-known/atproto-did/route.ts
Normal file
9
src/app/.well-known/atproto-did/route.ts
Normal 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' },
|
||||||
|
})
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue