Traefik plugin used to replace a http response code. Can be useful for example to mask an internal error code with another status code.
# Static configuration[pilot]token = "xxxx"[experimental.plugins.replace]modulename = "github.com/pierre-verhaeghe/traefik-replace-response-code"version = "v0.2.0"#
removeBody optional flag can be use to remove response body. By default removeBody is set to false
.
# Dynamic configurationhttp:routers:my-router:rule: host(`demo.localhost`)service: service-fooentryPoints:- webmiddlewares:- my-pluginservices:service-foo:loadBalancer:servers:- url: http://127.0.0.1:5000middlewares:my-plugin:plugin:replace:inputCode: 429outputCode: 200removeBody: true