I want to add a filter rule that allows urls of a certain /path that also end with .cfm.gql.json
In this case, the extension is json, and the selectors are cfm and gql. The issue is that I'm not sure how to how to check that both selectors are in the url, I only know how to check if one of them is in it using /selectors '(cfm|gql)'
I also want to avoid using a wildcard like /*.cfm.gql.json because that doesn't seem safe, and I don't think including selectors in the /path is a good choice either. Would appreciate any help!
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @IshaJa
Please refer to https://blog.developer.adobe.com/writing-better-aem-dispatcher-filters-f23b391624a9
Section: "Matching Multiple Selector Attributes"
Excerpt:
There is no way to express a Dispatcher filter that all selectors must match or that allows only a certain filter order. As a workaround, you can either
The link has examples of both /url and /selectors
Here is a possible solution but with dispatcher rewrite
RewriteEngine On
# Disallow URLs ending with .json and containing .cfm or .gql
RewriteCond %{REQUEST_URI} \.json$ [NC]
RewriteCond %{REQUEST_URI} \.(cfm|gql) [NC]
RewriteRule ^ - [F]
Please let me know if that serves your purpose.
Hello @IshaJa
Please refer to https://blog.developer.adobe.com/writing-better-aem-dispatcher-filters-f23b391624a9
Section: "Matching Multiple Selector Attributes"
Excerpt:
There is no way to express a Dispatcher filter that all selectors must match or that allows only a certain filter order. As a workaround, you can either
The link has examples of both /url and /selectors
Views
Likes
Replies