Skip to content

Commit

Permalink
// node-fetch will generate this for us. if we keep 'Host', it won't …
Browse files Browse the repository at this point in the history
…change with redirects!
  • Loading branch information
tamaina committed Jul 17, 2024
1 parent 1f0e7a4 commit de677a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/backend/src/core/activitypub/ApRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export async function createSignedPost(args: { level: string; key: PrivateKey; u
['(request-target)', 'date', 'host', 'digest'],
);

// node-fetch will generate this for us. if we keep 'Host', it won't change with redirects!
delete request.headers['Host'];

return {
Expand Down Expand Up @@ -68,6 +69,7 @@ export async function createSignedGet(args: { level: string; key: PrivateKey; ur
['(request-target)', 'date', 'host', 'accept'],
);

// node-fetch will generate this for us. if we keep 'Host', it won't change with redirects!
delete request.headers['Host'];

return {
Expand Down

0 comments on commit de677a5

Please sign in to comment.