[Nextcloud 29.0.4] Warnings about incorrect headers set-up

Hello!
In the Overview tab of he admin page, I get this warning:

Some headers are not set correctly on your instance - The `Strict-Transport-Security` HTTP header is not set (should be at least `15552000` seconds). For enhanced security, it is recommended to enable HSTS. For more details see the documentation ↗.

But I do not really know how should I solve this issue, even after looking at the linked documentation.
My setup is:

  • Nextcloud 29.0.4
  • UmbrelOS 1.2.2
  • Raspberry Pi 4

Please let me know if I can give you further information.

No problem! :love_you_gesture:

Open a terminal and type:

sudo nano ./umbrel/app-data/nextcloud/data/nextcloud/.htaccess

Add the following line to your .htaccess file:

Header set Strict-Transport-Security "max-age=15552000"

That should have been it! :sunglasses:

Thanks! It worked :+1:

I’m glad I could help you! :muscle: