CustomFilter is overriding OOTB RewriteFilter | Community
Skip to main content
Level 2
November 17, 2020
Solved

CustomFilter is overriding OOTB RewriteFilter

  • November 17, 2020
  • 2 replies
  • 950 views

Hi All,

We have a Custom Filter code, which crawls the Page response and replaces a text. 

This is working fine, but this code is overriding RewriteFilter class. Because of that, long-short url conversion is not happening.

If we give a higher Ranking to the Custom Filter, everything works fine. But we need to find a solution to this issue other than providing Ranking. Any pointers to this will help lot.

 

Thanks,

Parvathy

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 arunpatidar

If you just want to replace the content, you can use sling output rewriter

https://sling.apache.org/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html

2 replies

Ankur_Khare
Community Advisor
Community Advisor
November 17, 2020

Is it possible to share ur code?

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
November 17, 2020

If you just want to replace the content, you can use sling output rewriter

https://sling.apache.org/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html

Arun Patidar