How to remove cookie before proxying to upstream service

The Traefik is serving This serve multiple services behind the oauth2_proxy forward auth

For ex:


After successful authentication, oauth2_proxy set cookie named "_oauth2_proxy". This cookie is passed to all the services. This creates some side-effect.

I want to remove the particular cookie only before proxying to upstream service in Traefik. How to do that?


Have you tried to use a middleware for http headers and just set the cookie to empty?

Yes. I tried. It removes all the cookie.

There is no way to remove a particular cookie.