1. 29 May, 2023 2 commits
    • Nils Goroll's avatar
      Update README · a25e5b63
      Nils Goroll authored
      a25e5b63
    • Nils Goroll's avatar
      Add filters: regex objects to perform substitutions on bodies · f8fb9d5c
      Nils Goroll authored
      If the optional ``asfilter`` parameter to ``re.regex()`` is true, the
      vmod registers itself as a Varnish Fetch Processor (VFP) for use in
      `beresp.filters` and as a Varnish Delivery Processor (VDP) for use in
      `resp.filters`. In this setup, the `xregex.substitute_match()` and
      `xregex.substitute_all()` methods can be used to define replacements
      for matches on the body.
      
      Example:
      
      	    sub vcl_init {
      		new reiher = re.regex("r(ei)h(er)", asfilter = true);
      	    }
      	    sub vcl_deliver {
      		unset req.http.Accept-Encoding;
      		set resp.filters += " reiher";
      		reiher.substitute_match(1, "czapla");
      		reiher.substitute_match(2, "\1\2");
      		reiher.substitute_match(0, "heron");
      	    }
      f8fb9d5c
  2. 28 May, 2023 3 commits
  3. 02 May, 2023 2 commits
  4. 05 Apr, 2023 5 commits
  5. 04 Apr, 2023 1 commit
  6. 01 Apr, 2023 1 commit
  7. 28 Feb, 2023 1 commit
  8. 08 Dec, 2022 1 commit
  9. 01 Dec, 2022 1 commit
  10. 11 Nov, 2022 1 commit
  11. 08 Nov, 2022 3 commits
  12. 26 Oct, 2022 4 commits
  13. 15 Sep, 2022 1 commit
  14. 01 Nov, 2021 1 commit
    • Nils Goroll's avatar
      Revert "Use the VCL_REGEX type" · 685aa25e
      Nils Goroll authored
      The VCL_REGEX type requires that the pattern consist of constant strings only.
      
      In contrast, with a STRING argument and compilation in this vmod, we can support
      patterns to be constructed dynamically in vcl_init {}, which is a relevant
      advantage.
      
      I did consider to support both a STRING and a VCL_REGEX argument (both being
      optional, requiring at least one to be set) but found no compelling reason
      for using the VCL_REGEX type, because the pattern is checked anyway and it
      does not make a relevant difference if that check happens at the VCC or
      the vcl_init stage.
      
      This reverts commit 0ee2f4ae.
      685aa25e
  15. 28 Oct, 2021 1 commit
  16. 26 Oct, 2021 1 commit
  17. 13 Sep, 2021 1 commit
  18. 03 Aug, 2021 1 commit
  19. 06 Jan, 2021 8 commits
  20. 09 Dec, 2020 1 commit