+2
.env
+2
.env
+6
-2
src/lib/queries/constellation.ts
+6
-2
src/lib/queries/constellation.ts
···
4
4
5
5
import * as v from '@badrap/valita';
6
6
7
-
import { PUBLIC_CONSTELLATION_URL } from '$env/static/public';
7
+
import { PUBLIC_APP_USER_AGENT, PUBLIC_CONSTELLATION_URL } from '$env/static/public';
8
8
9
9
import type { Did } from '$lib/types/identity';
10
10
import { didString, integer, nsidString, recordKeyString } from '$lib/types/valita';
···
52
52
`&limit=${limit}` +
53
53
(cursor ? `&cursor=${cursor}` : '');
54
54
55
-
const response = await fetch(requestUrl);
55
+
const response = await fetch(requestUrl, {
56
+
headers: {
57
+
'user-agent': PUBLIC_APP_USER_AGENT,
58
+
},
59
+
});
56
60
if (!response.ok) {
57
61
// @todo: replace this with a non-SvelteKit error
58
62
error(503, `Constellation API returned ${response.status}`);