Skip to content

Commit c5a9366

Browse files
committed
edge-api: rewriter supports https://
1 parent eedf9ea commit c5a9366

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/constructs/edge-api/src/lambdas/rewriter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const middlewares: string[] = []
2020
const rewriteLocationHeader = (location: string, host: string) => {
2121
try {
2222
const url = new URL(location)
23-
if (url.hostname !== host && domains.find((domain) => url.hostname.endsWith(domain))) {
23+
if (url.hostname !== host && domains.find((domain) => url.hostname.endsWith(new URL(domain).hostname))) {
2424
url.hostname = host
2525
}
2626
return url.toString()

0 commit comments

Comments
 (0)