Forward-Request middleware (new middleware)

As traefik v2 support forward-Auth middleware which forward only headers to 'AuthSever', my requirement is to do validation of request body before sending request to actual service. Basically i need middleware which firstly forward complete request (header+body) to validator service and if validation get success then only send request to actual service.

I searched there is no such middleware, so i changed traefik code base and similar to forward-auth middleware introduces new middleware as forward-req which is able to forward headers + body.

My question is it valid feature? And if i will raise PR for it can it be reviewed and merged to traefik-proxy?

Hi @Prateeksuresh231

Sounds like something that may go well in the plugin system.

Hi @cakiwi

Thanks for quick reply.
I checked traefik plugin definitely above use case can be handled by it. One doubt i have in my case traefik is running on-prem not in cloud, will it be any issue using plugin approach in on-prem?
In some cases traefik will not have internet connectivity, still plugin approach will work?

Hi @Prateeksuresh231

On-Prem should not be an issue, but I think the 'no internet connectivity' could be an issue. I am only aware of the plugin system and have not really used it.

1 Like