Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 629 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 629 Bytes

subfilter

This subfilter middleware allows you to perform regular expression-based search and replace operations on both the body content and the headers of HTTP responses, with optional support for case-insensitive replacements.

Configuration

Dynamic:

http:
  middlewares:
    mysubfilter:
      plugin:
        subfilter:
          replacements:
            - pattern: "Kiwi"
              replacement: "Cherry"
            - pattern: "apple(.)"
              replacement: "banana?"
              flags: "i"

Replace pattern with replacement (Optional: flags: "i" specifies a case-insensitive match)