plugin-rewritebody
plugin-rewritebody copied to clipboard
Support a "Match Once" option
I have a use-case for injecting content into the
of a document but the way the plugin currently works means that if you match on or then the replacement string needs to also contain or , which it then matches on again, and again. giving you an infinite loop of replacements, and the go regex parser doesn't appear to support negative lookaheads which was the only way I could think of to avoid the problem.A "match once and stop" option would be a great addition.
We are having a hackathon right now! If you're up for it, you could submit a PR to include this feature and get a free t-shirt / sticker! If you need any help, sign up for the event and get the link for the discord server -- https://info.traefik.io/traefik-hackaethon-2020
If I had even the slightest familiarity with Go I'd happily PR it.