SSO and CSP issue

Hi,

I use nextcloud as an app of yunohost (https://yunohost.org). We’ve got an issue with CSP while logging in to nextcloud. We don’t use integrated SAML&SSO, but a redirection while loading the page. We are trying to find out how to solve the issue :

The issue is that js scripts won’t load after passing through 302 redirection for auth, probably because the page (index.php/apps/file/ is loaded twice. The second time the page is loaded, the generated nonce is the same as the js scripts, but the js script won’t load and console shows CSP errors. It seems the header isn’t reloaded/refreshed. I know this is more yunohost related, but we are struggling with that and i wondered if you knew how to force the last header to be the only one taken in consideration for CSP

Nextcloud version : 11.0.2
Operating system and version : Armbian Jessie 8.0
Apache or nginx version : nginx 1.6.2
PHP version : 5.6

@LukasReschke can you help here?