tangled
alpha
login
or
join now
flo-bit.dev
/
blento
your personal website on atproto - mirror
blento.app
20
fork
atom
overview
issues
pulls
pipelines
dont show other handles custom domain
Florian
1 day ago
9cfd7e21
eea985cb
+7
-2
1 changed file
expand all
collapse all
unified
split
src
routes
[actor=actor]
(pages)
+layout.server.ts
+7
-2
src/routes/[actor=actor]/(pages)/+layout.server.ts
···
2
2
import { env } from '$env/dynamic/private';
3
3
import { error } from '@sveltejs/kit';
4
4
import { createCache } from '$lib/cache';
5
5
-
import type { Handle } from '@atcute/lexicons';
6
5
7
7
-
export async function load({ params, platform }) {
6
6
+
export async function load({ params, platform, request }) {
8
7
if (env.PUBLIC_IS_SELFHOSTED) error(404);
9
8
10
9
const cache = createCache(platform);
10
10
+
11
11
+
const customDomain = request.headers.get('X-Custom-Domain');
12
12
+
13
13
+
if (customDomain) {
14
14
+
throw error(404, 'Page not found!');
15
15
+
}
11
16
12
17
return await loadData(params.actor, cache, false, params.page, env);
13
18
}