Skip to content

Commit e48545c

Browse files
authored
chore(middleware-host-header): move to low priority (#1540)
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.
1 parent 04b219a commit e48545c

File tree

1 file changed

+1
-0
lines changed
  • packages/middleware-host-header/src

1 file changed

+1
-0
lines changed

Diff for: packages/middleware-host-header/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export const hostHeaderMiddleware = <Input extends object, Output extends object
3535
export const hostHeaderMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation = {
3636
name: "hostHeaderMiddleware",
3737
step: "build",
38+
priority: "low",
3839
tags: ["HOST"],
3940
};
4041

0 commit comments

Comments
 (0)