Migrating from Nginx RP to Traefix - how to use "upgrade-insecure-requests"

Edit - sorry, making attempts

Wow, I think this worked...

    labels:
      - .
      - .
      - 'traefik.http.middlewares.testheader.headers.contentSecurityPolicy=upgrade-insecure-requests'
      - .
      - .
      - .
      - .
      - .

the middleware showed up in Traefik and I could apply it to my dynamic file provider service.

Below is the documentation page I am trying to follow to get my contentSecurityPolicy=upgrade-insecure-requests to work. I tried adding it to both my http and https entry points.

=======================================

Headers

Managing Request/Response headers

Headers

The Headers middleware manages the headers of requests and responses.

A set of forwarded headers are automatically added by default. See the FAQ for more information.

Configuration Examples

Adding Headers to the Request and the Response

The following example adds the X-Script-Name header to the proxied request and the X-Custom-Response-Header header to the response

Docker

labels:
  - "traefik.http.middlewares.testHeader.headers.customrequestheaders.X-Script-Name=test"
  - "traefik.http.middlewares.testHeader.headers.customresponseheaders.X-Custom-Response-Header=value"

Configuration Options

General

Warning

Custom headers will overwrite existing headers if they have identical names.

The detailed documentation for security headers can be found in unrolled/secure.

contentSecurityPolicy

The contentSecurityPolicy option allows the Content-Security-Policy header value to be set with a custom value.