-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Do you want to request a feature or report a bug?
Feature
What did you expect to see?
From one service, I would like to be able to redirect to another service by returning a response header similar to this:
X-Redirect: http://foo-service/bar
Alternatively a list of services that can be redirected to can be configured in the middleware and the header can look like this:
X-Redirect: foo-service /bar
Use case
We have an application that's currently using X-Sendfile to serve up big files without having to pass the data through the application itself. We're now in the process of switching from having the data stored on the local filesystem to storing it in S3-style object storage and would like an analogous way to tell Traefik to serve the file directly from the storage service.
I figure the implementation would look similar to the Errors middleware, except the redirect would be based on a custom response header rather than the response status.