Skip to content

This Traefik middleware modifies HTTP response bodies and headers according to user-defined regular expression (regex) patterns and replacements.

License

Notifications You must be signed in to change notification settings

chahn/subfilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

This Traefik middleware modifies HTTP response bodies and headers according to user-defined regular expression (regex) patterns and replacements.

Topics

Resources

License

Stars

Watchers

Forks

Languages