Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Referrer-Policy header to be configured #450

Closed
wants to merge 1 commit into from

Conversation

LouisMT
Copy link
Contributor

@LouisMT LouisMT commented Sep 7, 2018

This PR adds the ability to configure the Referrer-Policy header using the Docker image by setting an environment variable.

Example:

docker run -e APACHE_REFERRER_POLICY=no-referrer nextcloud

This is needed because I'm now getting the following warning in my NextCloud 14 control panel and there's no clean way of fixing this right now (see nextcloud/server#9122):

The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin" or "strict-origin-when-cross-origin". This can leak referer information. See the W3C Recommendation ↗.

Note that this header will not be added to the response if this environment variable is not set, so this is not a breaking change. Without explicitly setting the variable, the security message will still appear.

@tilosp
Copy link
Member

tilosp commented Sep 9, 2018

I think it would make sense to have this header by default.
@pierreozoux @J0WI what do you think?

@J0WI
Copy link
Contributor

J0WI commented Sep 9, 2018

Yes, they should be there by default. But I don't want to make nextcloud/server#8207 (comment) worse.

@LouisMT
Copy link
Contributor Author

LouisMT commented Sep 9, 2018

Do you mean that this header should be added in the server repository using PHP, so it's all in one place and easier to refactor later?

@J0WI
Copy link
Contributor

J0WI commented Dec 12, 2018

The header is now present in NC 15.

@tilosp tilosp closed this Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants