AEM Dispatcher extension filter - how to ignore case

saibul

28-01-2020

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

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

jonimarrero95

28-01-2020

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)' }

 

Answers (1)

Answers (1)

jbrar

Employee

29-01-2020

 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