Nextcloud check is buggy? ( Headers Error )

Hi,

NextCloud 19.0.3 - Apache2 - Php 7.4 - Ubuntu 20.03

My nextclout had no problem yesterday but this morning i got to error message:

  • L’en-tête HTTP “X-Frame-Options” n’est pas configurée pour être égale à “SAMEORIGIN”. Ceci constitue un risque potentiel relatif à la sécurité et à la vie privée étant donné qu’il est recommandé d’ajuster ce paramètre.

  • L’en-tête HTTP “Strict-Transport-Security” n’est pas configurée à au moins “15552000” secondes. Pour renforcer la sécurité, nous recommandons d’activer HSTS comme décrit dans nos conseils de sécurisation :arrow_upper_right:.

Checked all conf, trying some other, i always have this warning. Any idea ?

Here is my vhost file:

<VirtualHost *:1443>

ServerAdmin admin@nextcloud.denisflamant.com
ServerName nextcloud.denisflamant.com
ServerAlias next.denisflamant.com

DocumentRoot /var/www/nextcloud

<Directory /var/www/nextcloud>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Satisfy Any
</Directory>

<IfModule mod_dav.c>
Dav off
</IfModule>

<IfModule mod_headers.c>

Header onsuccess unset Strict-Transport-Security
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"

Header onsuccess unset X-Content-Type-Options
Header always set X-Content-Type-Options: "nosniff"

Header onsuccess unset X-Frame-Options
Header always set X-Frame-Options: "SAMEORIGIN"

</IfModule>

SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud

Include ssl.conf

Here is a Header test that show exactly what nextcloud need :

another one:

1 Like

i am the only one ? :frowning:

2 Likes

No sir you are not alone there are your students to help you :sweat_smile: