All Projects → traefik → plugin-rewritebody

traefik / plugin-rewritebody

Licence: Apache-2.0 license
No description or website provided.

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to plugin-rewritebody

souin
An HTTP cache system, RFC compliant, compatible with @TykTechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @gin-gonic, @zalando, @zeromicro, @nginx and @apache
Stars: ✭ 269 (+715.15%)
Mutual labels:  traefik, traefik-plugin
traefik-private-plugins
Automatic patch for Traefik supporting private plugins
Stars: ✭ 21 (-36.36%)
Mutual labels:  traefik, traefik-plugin
htransformation
A Traefik plugin to change on the fly header's value of a request
Stars: ✭ 44 (+33.33%)
Mutual labels:  traefik, traefik-plugin
traefik-ondemand-plugin
Traefik plugin to scale containers on demand
Stars: ✭ 149 (+351.52%)
Mutual labels:  traefik, traefik-plugin
ceil
Helmut Hoffer von Ankershoffen experimenting with auto-provisioned RPi cluster running K8S on bare-metal
Stars: ✭ 42 (+27.27%)
Mutual labels:  traefik
traefik-letsencrypt-compose
Basic Traefik configuration which includes automatic Let’s Encrypt certificate management and password protected dashboard
Stars: ✭ 38 (+15.15%)
Mutual labels:  traefik
dockerized
🐳 Build once, run anywhere
Stars: ✭ 70 (+112.12%)
Mutual labels:  traefik
workfromhome-with-docker
HTML5 based remote desktop gateway using Apache Guacamole and Traefik Reverse Proxy including AD authentication and 2-FA
Stars: ✭ 42 (+27.27%)
Mutual labels:  traefik
generator-mitosis
A micro-service infrastructure generator based on Yeoman/Chatbot, Kubernetes/Docker Swarm, Traefik, Ansible, Jenkins, Spark, Hadoop, Kafka, etc.
Stars: ✭ 78 (+136.36%)
Mutual labels:  traefik
nkchat
A web-based chat application using modern technologies such as React, GraphQL and styled-components
Stars: ✭ 20 (-39.39%)
Mutual labels:  traefik
Moviepark
A Nuxt universal app with an Adonis 5 api server using the TMDb API for its movie catalog.
Stars: ✭ 32 (-3.03%)
Mutual labels:  traefik
Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+23036.36%)
Mutual labels:  traefik
traefik-workshop
Getting started with Traefik on Kubernetes. A few exercises that help you to start the journey with Traefik Proxy.
Stars: ✭ 83 (+151.52%)
Mutual labels:  traefik
full-stack-flask-couchdb
Full stack, modern web application generator. Using Flask, CouchDB as database, Docker, Swagger, automatic HTTPS and more.
Stars: ✭ 28 (-15.15%)
Mutual labels:  traefik
trauth
🔑 A simple Traefik ForwardAuth server for HTTP Basic SSO
Stars: ✭ 30 (-9.09%)
Mutual labels:  traefik
terraform-cloudinit-container-server
A batteries included cloud-init config to quickly and easily deploy a single Docker image or Docker Compose file to any Cloud™ VM.
Stars: ✭ 52 (+57.58%)
Mutual labels:  traefik
Swarmprom
Docker Swarm instrumentation with Prometheus, Grafana, cAdvisor, Node Exporter and Alert Manager
Stars: ✭ 1,739 (+5169.7%)
Mutual labels:  traefik
infrastructure
Flux based GitOps repository for my home lab infrastructure.
Stars: ✭ 14 (-57.58%)
Mutual labels:  traefik
Kubernetes Vagrant Centos Cluster
Setting up a distributed Kubernetes cluster along with Istio service mesh locally with Vagrant and VirtualBox, only PoC or Demo use.
Stars: ✭ 1,750 (+5203.03%)
Mutual labels:  traefik
Mesh
Traefik Mesh - Simpler Service Mesh
Stars: ✭ 1,571 (+4660.61%)
Mutual labels:  traefik

Rewrite Body

Rewrite body is a middleware plugin for Traefik which rewrites the HTTP response body by replacing a search regex by a replacement string.

Configuration

Static

[pilot]
  token = "xxxx"

[experimental.plugins.rewritebody]
  modulename = "github.com/traefik/plugin-rewritebody"
  version = "v0.3.1"

Dynamic

To configure the Rewrite Body plugin you should create a middleware in your dynamic configuration as explained here. The following example creates and uses the rewritebody middleware plugin to replace all foo occurrences by bar in the HTTP response body.

If you want to apply some limits on the response body, you can chain this middleware plugin with the Buffering middleware from Traefik.

[http.routers]
  [http.routers.my-router]
    rule = "Host(`localhost`)"
    middlewares = ["rewrite-foo"]
    service = "my-service"

[http.middlewares]
  [http.middlewares.rewrite-foo.plugin.rewritebody]
    # Keep Last-Modified header returned by the HTTP service.
    # By default, the Last-Modified header is removed.
    lastModified = true

    # Rewrites all "foo" occurences by "bar"
    [[http.middlewares.rewrite-foo.plugin.rewritebody.rewrites]]
      regex = "foo"
      replacement = "bar"

[http.services]
  [http.services.my-service]
    [http.services.my-service.loadBalancer]
      [[http.services.my-service.loadBalancer.servers]]
        url = "http://127.0.0.1"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].