mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
Fix headers in Federation and User entities
This commit is contained in:
parent
34499bfecb
commit
8bcf46641c
|
|
@ -50,7 +50,7 @@ export const objectToInboxRequest = async (
|
|||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Date: date.toISOString(),
|
||||
Origin: config.http.base_url,
|
||||
Origin: new URL(config.http.base_url).host,
|
||||
Signature: `keyId="${author.uri}",algorithm="ed25519",headers="(request-target) host date digest",signature="${signatureBase64}"`,
|
||||
},
|
||||
body: JSON.stringify(object),
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ export const addInstanceIfNotExists = async (
|
|||
|
||||
if (found) return found;
|
||||
|
||||
console.log(`Fetching instance metadata for ${origin}`);
|
||||
|
||||
// Fetch the instance configuration
|
||||
const metadata = (await fetch(new URL("/.well-known/lysand", origin)).then(
|
||||
(res) => res.json(),
|
||||
|
|
|
|||
|
|
@ -137,7 +137,6 @@ export const resolveUser = async (uri: string) => {
|
|||
const response = await fetch(uri, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue