Thanks! Gonna try that!
So there is no need to create a provider folder? That also means that the change done to `package.json``s dependencies also is not necessary?
Shouldn’t env('SFTP_HOST') be enough instead of ${process.env.SFTP_HOST}? After all env is passed to the function body…
UPDATE:
This works great! And for the middlewares.js, one simply adds the URL of the host, too:
module.exports = [
'strapi::errors',
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
'connect-src': ["'self'", 'https:'],
'img-src': ["'self'", 'data:', 'blob:', 'your.domain.tld'],
'media-src': ["'self'", 'data:', 'blob:', 'your.domain.tld'],
// OR using env vars:
//'img-src': ["'self'", 'data:', 'blob:', `${process.env.SFTP_BASEURL}`],
//'media-src': ["'self'", 'data:', 'blob:', `${process.env.SFTP_BASEURL}`],
upgradeInsecureRequests: null,
},
},
},
},
[...]
]
Then thumbnails are shown in the media library in strapi’s backend.
Thank you, @Hoja !