Skip to content

Comments

Add option to set overwrite.cli.url for occ install#11602

Closed
kesselb wants to merge 1 commit intomasterfrom
feature/6313/occ-install-overwrite
Closed

Add option to set overwrite.cli.url for occ install#11602
kesselb wants to merge 1 commit intomasterfrom
feature/6313/occ-install-overwrite

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented Oct 3, 2018

Set overwrite.cli.url for occ maintenance:install

Close #6313

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb added the 3. to review Waiting for reviews label Oct 3, 2018
@kesselb kesselb added this to the Nextcloud 15 milestone Oct 3, 2018
@MorrisJobke
Copy link
Member

Is really the option needed or can't we just fix the breaking statement? Because I would avoid to put more options in the install command.

Alternative way is to create a file config/NAME.config.php with this as content:

<?php

$CONFIG = [
	'overwrite.cli.url' => 'https://cloud.example.org',
];

This file will then be merge in the config by default and will overwrite the one in config.php.

@kesselb
Copy link
Contributor Author

kesselb commented Oct 3, 2018

Alternative way is to create a file config/NAME.config.php with this as content:

For an automated setup i guess there is no huge difference (appending another option vs. prepare config.php). I took the issue because of https://github.com/nextcloud/server/labels/Hacktoberfest 🙈

@MorrisJobke
Copy link
Member

For an automated setup i guess there is no huge difference (appending another option vs. prepare config.php).

It's not about admins, but about us. Because we then need to maintain multiple ways of doing it. 😉

@kesselb
Copy link
Contributor Author

kesselb commented Oct 3, 2018

For an automated setup i guess there is no huge difference (appending another option vs. prepare config.php).

It's not about admins, but about us. Because we then need to maintain multiple ways of doing it. wink

Fine for me 👍

@kesselb kesselb closed this Oct 3, 2018
@MorrisJobke MorrisJobke deleted the feature/6313/occ-install-overwrite branch October 3, 2018 20:36
@MorrisJobke
Copy link
Member

Fine for me 👍

But the general fix in here is still nice to have. Or did it only fix the issue when the option was provided?

@kesselb
Copy link
Contributor Author

kesselb commented Oct 3, 2018

The issue is only fixed when option provided.

/**
* Returns the unverified server host from the headers without checking
* whether it is a trusted domain
* @return string Server host
*/
public function getInsecureServerHost(): string {
$host = 'localhost';

localhost is coming from this place because there is no way to detect url when using occ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants