- 11 Feb 2024
- 1 Minute to read
- Print
- PDF
Path Order
- Updated on 11 Feb 2024
- 1 Minute to read
- Print
- PDF
The CDN evaluates the request URI against each path in the list in the order in which they appear. Only rules in the first path that matches the requested URI are applied. It is important to arrange the path list in a logical way to achieve the desired outcome.
In case of overlapping paths, where multiple paths match specific content items, the subpath should be positioned first in the list. For example, if you want to apply certain rules to all the .m3u8 files except for those in the xyz path, organize the paths as follows:
Path 1: /xyz/*.m3u8
Path 2: *.m3u8
This arrangement ensures that requests for .m3u8 files within the /xyz/ path adhere to the rules specified by path /xyz/*.m3u8, rather than those specified by path *.m3u8. Requests for other .m3u8 files follow the rules of the *.m3u8 path.
In the following example, the path order is illogical:
The processing parameters defined for the second path will never be applied, because the path /*.jpg encompasses the files in the path /path2/*.jpg.
Note that this type of mistake will not generate a validation error.
If the goal is to apply distinct rules to files in /path2/*.jpg, the order should be adjusted so that in the path list, the more specific path precedes the broader path:
Here's another example of a logical path order, where the paths are arranged based on hierarchy, with the most specific paths appearing before the less specific ones.