forked from mirror/misskey
move delete host
This commit is contained in:
parent
de677a5b1f
commit
e602f2efda
@ -40,9 +40,6 @@ export async function createSignedPost(args: { level: string; key: PrivateKey; u
|
|||||||
['(request-target)', 'date', 'host', 'digest'],
|
['(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 {
|
return {
|
||||||
request,
|
request,
|
||||||
...result,
|
...result,
|
||||||
@ -69,9 +66,6 @@ export async function createSignedGet(args: { level: string; key: PrivateKey; ur
|
|||||||
['(request-target)', 'date', 'host', 'accept'],
|
['(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 {
|
return {
|
||||||
request,
|
request,
|
||||||
...result,
|
...result,
|
||||||
@ -109,6 +103,9 @@ export class ApRequestService {
|
|||||||
digest,
|
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', {
|
this.logger.debug('create signed post', {
|
||||||
version: 'draft',
|
version: 'draft',
|
||||||
level,
|
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', {
|
this.logger.debug('create signed get', {
|
||||||
version: 'draft',
|
version: 'draft',
|
||||||
level,
|
level,
|
||||||
|
Loading…
Reference in New Issue
Block a user