0

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.

Sankalp Sharma
  • 267
  • 1
  • 3
  • 12

1 Answers1

2

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.

Michael - sqlbot
  • 22,658
  • 2
  • 63
  • 86