Skip to content

Commit

Permalink
Merge pull request #1370 from aligent/fix/ignore-ending-wildcards
Browse files Browse the repository at this point in the history
fix: ignore wildcards at end of path
  • Loading branch information
TheOrangePuff authored May 20, 2024
2 parents 8fa88ec + 267aabc commit c8ab88d
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 c8ab88d

Please sign in to comment.