Strapi upload provider contabo

I know this thread is a bit old, but how do you add the contentSecurityPolicy for Contabo in middlewares.ts?

I tried this, but it didn’t work:

{
    name: "strapi::security",
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          "connect-src": ["'self'", "https:"],
          "img-src": [
            "'self'",
            "data:",
            "blob:",
            `${env("CONTABO_OBJECT_STORAGE_ENDPOINT")}`,
          ],
          "media-src": [
            "'self'",
            "data:",
            "blob:",
            `${env("CONTABO_OBJECT_STORAGE_ENDPOINT")}`,
          ],
          upgradeInsecureRequests: null,
        },
      },
    },
  },