Expand my Community achievements bar.

SOLVED

AEM Dispatcher extension filter - how to ignore case

Avatar

Level 4

Publish-OS: RHEL 7
AEM 6.5.1
ACS: 4.2.2
Dispatcher-OS : RHEL 7
Dispatcher 4.2.3

 

we have a lot of image assets and the extension of the assets is not uniform, we have extensions like JPG, jpg, Jpg for different assets, also we have the same type of issues for for gif, doc, pptx as well. 

 

I have the following entry in dispatcher filter to whitelist, but it allows only the jpg not the other cased(JPG, Jpg) formats.

/1010 {  /type "allow" /extension '(jpg|gif|ico|js|png|swf|jpe)' }

 

Is there a way to ignore case in filter or workaround there...

thanks in advance

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi,

 

I'm not sure but can you test this:
I think that you need to put the /path, if continue the problem check the second line too. This is the default configuration in the WKND project of Adobe so it should be work.

# This rule allows content to be access
/0010 { /type "allow" /extension '(css|eot|gif|ico|jpeg|jpg|js|gif|pdf|png|svg|swf|ttf|woff|woff2|html)' /path "/content/*" } # disable this rule to allow mapped content only

# Enable specific mime types in non-public content directories
/0011 { /type "allow" /method "GET" /extension '(css|eot|gif|ico|jpeg|jpg|js|gif|png|svg|swf|ttf|woff|woff2)' }

 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

Hi,

 

I'm not sure but can you test this:
I think that you need to put the /path, if continue the problem check the second line too. This is the default configuration in the WKND project of Adobe so it should be work.

# This rule allows content to be access
/0010 { /type "allow" /extension '(css|eot|gif|ico|jpeg|jpg|js|gif|pdf|png|svg|swf|ttf|woff|woff2|html)' /path "/content/*" } # disable this rule to allow mapped content only

# Enable specific mime types in non-public content directories
/0011 { /type "allow" /method "GET" /extension '(css|eot|gif|ico|jpeg|jpg|js|gif|png|svg|swf|ttf|woff|woff2)' }

 

Avatar

Employee Advisor

 For now, you can use the brute force method. Example: In the filter mention, [Cc][Ss][Ss] which will allow cSs,Css etc.

 

That said, there is an internal enhancement request to support PCRE modifiers[1] which will make this a lot easier.

 

[1]https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php