linuxserver / docker-nextcloud

GNU General Public License v3.0
705 stars 128 forks source link

Change the default header of X-Robots-Tag to "noindex, nofollow" #299

Closed stavros-k closed 1 year ago

stavros-k commented 1 year ago

linuxserver.io



Description:

NC 26 shows the bellow warning:

image

Benefits of this PR and context:

Partially fixes #298

Follow upstream nextcloud suggestions

How Has This Been Tested?

Manually made the changes on my instance, restarted it and warning was gone. Also checked headers in the dev tools in browser

Source / References:

LinuxServer-CI commented 1 year ago

I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/nextcloud/26.0.0-pkg-ff88fd2c-pr-299/index.html https://ci-tests.linuxserver.io/lspipepr/nextcloud/26.0.0-pkg-ff88fd2c-pr-299/shellcheck-result.xml

thespad commented 1 year ago

The X-Robots-Tag header is set to none, this is equivalent to noindex, nofollow (source), so I have no idea why Nextcloud have decided to pointlessly change their detection for this.

aptalca commented 1 year ago

Pretty sure when it comes to header detection, Nextcloud looks for an exact match of whatever parameter they like, and if it doesn't match exactly, it complains. It's pretty poor implementation.

thespad commented 1 year ago

Yeah, but in previous versions they were happy with none, because that's what we've used for ages, which suggests they've changed what they're looking for.

stavros-k commented 1 year ago

https://github.com/nextcloud/server/pull/36689

While "none" is indeed equivalent to "noindex, nofollow" for Google, but seems to be not supported by Bing and probably other search engines.