How can I change response header in the default error response?

Hi everyone,

I want to modify a http response header if a service fails and traefik returns its default 503 service not available response.
I know how to add a middleware that adds a response header

apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: test-header
spec:
  headers:
    customResponseHeaders:
       Cache-Control: "no-cache"

but Im not sure how I can conditionally add this header only in case a 503 status code is returned by traefik, for all routes/services. any idea on how I can realize this?

Thanks & Best