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.
Related videos on Youtube
Comments
-
Sankalp Sharma over 1 year
From what it appears, Cloudfront Path Pattern doesn't support complete regex.
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.