🐛 Bug fixes
All checks were successful
release-nightly / build-docker (push) Successful in 1m19s

This commit is contained in:
2023-12-16 22:57:32 +08:00
parent 4942a8b7a2
commit 0ffd582d80
4 changed files with 10 additions and 6 deletions

View File

@ -8,7 +8,7 @@ import (
var CompressResponse = RequestTransformer{
ModifyResponse: func(options any, ctx *fiber.Ctx) error {
opts := DeserializeOptions[struct {
Level int `json:"level"`
Level int `json:"level" yaml:"level"`
}](options)
var fctx = func(c *fasthttp.RequestCtx) {}

View File

@ -9,10 +9,10 @@ import (
var ReplacePath = RequestTransformer{
ModifyRequest: func(options any, ctx *fiber.Ctx) error {
opts := DeserializeOptions[struct {
Pattern string `json:"pattern"`
Value string `json:"value"`
Repl string `json:"repl"` // Use when complex mode(regexp) enabled
Complex bool `json:"complex"`
Pattern string `json:"pattern" yaml:"pattern"`
Value string `json:"value" yaml:"value"`
Repl string `json:"repl" yaml:"repl"` // Use when complex mode(regexp) enabled
Complex bool `json:"complex" yaml:"complex"`
}](options)
path := string(ctx.Request().URI().Path())
if !opts.Complex {