Configure AWS Cloudfront Path Pattern workaround for Regular Expression

6,565

Put /*/* earlier in the path order (lower sequence number) and /* later in the list.

CloudFront uses first match, not best match and /*/* won't match anything without at least one slash in the middle of the path. Of course, the default behavior may make the second entry unnecessary.

Share:
6,565

Related videos on Youtube

Sankalp Sharma
Author by

Sankalp Sharma

Spinning the web at Sportskeeda.

Updated on September 18, 2022

Comments

  • Sankalp Sharma
    Sankalp Sharma over 1 year

    From what it appears, Cloudfront Path Pattern doesn't support complete regex.

    enter image description here

    What I want to achieve is to separate the requests /[a-z]* from the requests /[a-z]/.+ to different origins.

    So, a request /page must have a different behavior from /page/something. And I can't seem to figure out a way of doing this.