1
0
forked from mirror/misskey

move delete host

This commit is contained in:
tamaina 2024-07-17 23:55:39 +09:00
parent de677a5b1f
commit e602f2efda

View File

@ -40,9 +40,6 @@ 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 {
request,
...result,
@ -69,9 +66,6 @@ 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 {
request,
...result,
@ -109,6 +103,9 @@ export class ApRequestService {
digest,
});
// node-fetch will generate this for us. if we keep 'Host', it won't change with redirects!
delete req.request.headers['Host'];
this.logger.debug('create signed post', {
version: 'draft',
level,
@ -140,6 +137,9 @@ export class ApRequestService {
},
});
// node-fetch will generate this for us. if we keep 'Host', it won't change with redirects!
delete req.request.headers['Host'];
this.logger.debug('create signed get', {
version: 'draft',
level,