Skip to content

Commit

Permalink
Prevent the block on redirects
Browse files Browse the repository at this point in the history
Far better way to handle the same solution. Plus it fixes the CI
  • Loading branch information
aran112000 committed Jun 9, 2023
1 parent 71b1580 commit 8609c1e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/classes/cloudfrontFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import ServerlessError from "../utils/error";

export function redirectToMainDomain(domains: string[] | undefined): string {
if (domains === undefined || domains.length < 2) {
throw new ServerlessError(
`Invalid value in 'redirectToMainDomain': you must have at least 2 domains configured to enable redirection to the main domain.`,
"LIFT_INVALID_CONSTRUCT_CONFIGURATION"
);
return "";
}

const mainDomain = domains[0];
Expand Down

0 comments on commit 8609c1e

Please sign in to comment.