fix: remove redirect, use proxied data
This commit is contained in:
parent
d142db7fe4
commit
12cd9f4fe6
|
@ -3,15 +3,6 @@ const nextConfig = {
|
||||||
images: {
|
images: {
|
||||||
domains: ["cdn.sanity.io"],
|
domains: ["cdn.sanity.io"],
|
||||||
},
|
},
|
||||||
async redirects() {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: "/.well-known/matrix/:slug*",
|
|
||||||
destination: "https://matrix.jackmerrill.com/.well-known/matrix/:slug*",
|
|
||||||
permanent: true,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = nextConfig;
|
module.exports = nextConfig;
|
||||||
|
|
13
src/app/.well-known/matrix/[slug]/route.ts
Normal file
13
src/app/.well-known/matrix/[slug]/route.ts
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
export async function GET(
|
||||||
|
request: Request,
|
||||||
|
{ params }: { params: { slug: string } }
|
||||||
|
) {
|
||||||
|
const slug = params.slug; // 'server', 'client', or 'support' for Matrix
|
||||||
|
|
||||||
|
const response = await fetch(
|
||||||
|
`https://matrix.jackmerrill.com/.well-known/matrix/${slug}`
|
||||||
|
);
|
||||||
|
const headers = { "content-type": "application/json" };
|
||||||
|
const body = JSON.stringify(await response.json());
|
||||||
|
return new Response(body, { headers });
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user