Skip to content

Commit

Permalink
fix: ignore wildcards at end of path
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOrangePuff committed May 20, 2024
1 parent 8fa88ec commit 3628484
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/static-hosting/lib/static-hosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ export class StaticHosting extends Construct {
} as Behavior;

// If the remap is to a different path, create a Lambda@Edge function to handle this
if (from !== to) {
// Ignore wildcards at the end of a path
if (from.replace(/\*$/, '') !== to) {
// Remove special characters from path
const id = from.replace(/[&/\\#,+()$~%'":*?<>{}]/g, "-");

Expand Down

0 comments on commit 3628484

Please sign in to comment.