[solved] Mail App (0.5.3) is not showing mailbody (Content Security Policy)

There is no mailbody shown in the mail app. If you look in the Chrome Console you can see the following error:

"mail.min.js?v=1821c93…:150 Refused to frame 'http://cloud.domain.tld/index.php/apps/mail/accounts/5/folders/SURTHT1g=/messages/31882/html' because it violates the following Content Security Policy directive: "frame-src 'self'"."

My server config does not allow http, only https. What can I do to avoid this error.

Hi,

It looks like Nextcloud, or at the least mail app is not aware it’s operating with SSL. Try forcing https in your config.php file.

Add ‘overwriteprotocol’ => ‘https’, to your config.php file.

1 Like

Did you visit that page with HTTP before? It seems like the client cached the HTML message body’s URL and therefore it tries to load the message via HTTP and not HTTPS.

Try to run localStorage.clear() in your browser, that might help

1 Like

I first deleted the localstorage via chrome://settings/cookies#cont in the Google Chrome Omnibox. That did not help. But after the editing of the config.php file the Mail App is working again.