/Cookie Path Rewrite Plugin

Cookie Path Rewrite Plugin

2
v0.0.1

Cookie Path Rewrite

Cookie Path Rewrite is a middleware plugin for Traefik which rewrites the path of a cookie in the response. Inspired by SchmitzDan/traefik-plugin-cookie-path-prefix and XciD/traefik-plugin-rewrite-headers.

Configuration

Static

experimental:
plugins:
cookiePathRewrite:
modulename: "github.com/vnghia/traefik-plugin-rewrite-cookie-path"
version: "v0.0.1"

Dynamic

To configure the plugin you should create a middleware in your dynamic configuration as explained here. The following example creates and uses the cookie path prefix middleware plugin to replace the cookies path whose key is someName from /foo to /bar:

http:
middlewares:
cookiePathRewrite:
plugin:
cookiePathRewrite:
rewrites:
- name: someName
regex: "/foo"
replacement: "/bar"

Configuration can also be set via toml or docker labels.