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'],
|
||||
);
|
||||
|
||||
// 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,
|
||||
|
|
Loading…
Reference in New Issue