Skip to content

Commit

Permalink
chore(middleware-host-header): move to low priority (#1540)
Browse files Browse the repository at this point in the history
AWS Signer requires a request to contain a `host` header, mostly the same as the request's `hostname`. 
For the customizations that modifies the request's `hostname`, they need to be applied before this 
middleware, Otherwise the `hostname` and `host` header would mismatch. It mean these middleware
**must** be applied relatively before this middleware. By moving it low priority, it reduce the possibility 
of mistakenly adding customizations applied after this middleware. Developers only need to apply the
customizations to the `build` step, and they will be applied before this middleware by default.
  • Loading branch information
AllanZhengYP committed Sep 29, 2020
1 parent 04b219a commit e48545c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/middleware-host-header/src/index.ts
Expand Up @@ -35,6 +35,7 @@ export const hostHeaderMiddleware = <Input extends object, Output extends object
export const hostHeaderMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation = {
name: "hostHeaderMiddleware",
step: "build",
priority: "low",
tags: ["HOST"],
};

Expand Down

0 comments on commit e48545c

Please sign in to comment.