-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expose reverse proxy related configuration as environment variables #1048
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
Conversation
|
I think we go for #1010 (comment) |
Yeah. But we should do both ;) We need to merge the configuration after #1010 is merged and make sure to set the proper defaults. |
Signed-off-by: András Maróy <andras@maroy.hu>
Co-Authored-By: J0WI <J0WI@users.noreply.github.com> Signed-off-by: András Maróy <andras@maroy.hu>
Co-Authored-By: J0WI <J0WI@users.noreply.github.com> Signed-off-by: András Maróy <andras@maroy.hu>
Signed-off-by: András Maróy <andras@maroy.hu>
|
I've set the defaults for these to empty strings (empty array obviously for trusted proxies), I figure that should remove these values when merging conflicts. Please let me know if this should be done differently. |
|
Please change the default value to It's necessary because Nextcloud merges the configuration files together. That's only a problem if you previously set a value and want to unset it again. To unset it again we need a value that evaluates to false on isset. Otherwise Nextcloud will not use the internal defaults leading to unexpected behaviour. https://github.com/nextcloud/server/blob/19ca921676240350abd694d8ca2d7b8c19fbd95a/lib/private/Config.php#L96-L100 is the code in question. |
Signed-off-by: András Maróy <andras@maroy.hu>
|
Done, thanks for pointing me in the right direction. |
|
@andrasmaroy the other PR is merged now. Mind to rebase your PR? We picked a similar but different name for the configuration file. |
Will do, I prefer merging instead of rebasing though if that's not against the conventions here. |
Signed-off-by: András Maróy <andras@maroy.hu>
Signed-off-by: András Maróy <andras@maroy.hu>
Signed-off-by: András Maróy <andras@maroy.hu>
Signed-off-by: András Maróy <andras@maroy.hu>
|
Did a quick test:
|
kesselb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build fails. Mind to update your branch with the latest changes from master one last time?
Signed-off-by: András Maróy <andras@maroy.hu>
|
Nextcloud 19-beta has been added as image. You might run update.sh again to apply the changes to that image too. |
Signed-off-by: András Maróy <andras@maroy.hu>
kesselb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
Don't know what's wrong with the build.
|
Hold on :) We have some reports that #1010 is going to break existing setups because null is used as default if the env is not set. |
|
Would you mind to update your pr another time and remove all the else null blocks? |
Sure although in this case maybe there should be a notice somewhere that omitting these environment variables won't remove the configuration values? |
That make sense yes. |
…ing deployments Signed-off-by: András Maróy <andras@maroy.hu>
|
is this fixed in the 17.0.5 image? i can't get a clean install of 17.0.5 to work as far as the trusted proxies option goes...17.0.4 works, and i can then upgrade to 17.0.5 once it's set up. if i do a straight install of 17.0.5, trusted proxies never works. |
|
This pull request is not merged so the answer is no. Just use the new trusted proxies environment variable with 17.0.5. |
i'm good now because i just started with 17.0.4 and then upgraded, and that worked...just was curious if this would eventually fix the issue with 17.0.5 clean install not working with reverse proxy. thanks! |
|
It will fix the issue once merged. |
As #819 seems abandoned to me, I implemented @kesselb's suggestion of putting these variables into a separate config file.
Should fix #792