AEM Dispatcher extension filter - how to ignore case | Community
Skip to main content
saibul
Level 4
January 28, 2020
Solved

AEM Dispatcher extension filter - how to ignore case

  • January 28, 2020
  • 2 replies
  • 3972 views

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

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jonimarrero95

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

 

2 replies

jonimarrero95Accepted solution
Level 2
January 28, 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)' }

 

Adobe Employee
January 29, 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