implement getUpdaterUrl to handle reverse proxy configurations#312
implement getUpdaterUrl to handle reverse proxy configurations#312fermulator wants to merge 2 commits intonextcloud:masterfrom
Conversation
… root overwrite Signed-off-by: fermulator <github@fermulator.fastmail.org>
Signed-off-by: fermulator <github@fermulator.fastmail.org>
|
CI fails because Nextcloud master does not install on PHP 7.2 anymore (7.3+ is needed). But the other CI tests look good. Let me look into those tests later. |
|
@kesselb Any opinion on this? |
|
Looks good to me 👍 I wonder if we need the new method at all. Line 1875 in 1ed9c8e We could also use |
@MorrisJobke - I presume there would be a separate ticket for this? - I agree it needs to be fixed |
@kesselb - I am not sure myself about it - if you think it is worth pursuing we could fork/split a ticket/issue; EDIT: I might see how it is in scope; if you're saying there is a different approach recommended, I can look into it. (though, I guess it was you yourself who suggested this initial approach ;o #265 (comment)) |
|
@MorrisJobke @kesselb - are we doing this? (not sure what the expectations are for PR rework/acceptance ;o) |
|
? |
|
Mind to test the self version? |
🤷 (out of scope for now I'd say) EDIT: to clarify, i don't know what the "self version" is |
|
@MorrisJobke @kesselb "poke" :( sorry! |
Afaik that's the right way. |
How? |
Please make a backup of the current version just in case. First revert the php changes. And then change Thanks 👍 |
|
OK! (finally attention to this ... sorry) (current baseline: [Nextcloud (snip)] 22.2.9, A new version is available: Nextcloud 23.0.6)
|
|
Thanks for testing 👍 Your output looks good to me. The initial issue was something like Receive "Check for expected files: Parsing response failed. […]" because the post request to trigger the update went to the wrong path. If I understand you correct the files are replaced but the redirect back to Nextcloud failed. That's a related but different story. I guess we have to adjust some more javascript here. |
|
OK I can retest w/ more attention to detail (TBH I was multi-tasking) - |
|
For this PR I also think there is value in retaining some of the PHP refactoring. |
As per #265 - #265 (comment) @kesselb suggestion
These changes
updaterUrllogic (which was previously set in MAIN BODY) in a new function entitled:getUpdaterUrl()with the updater classupdaterUrlfromgetConfigOption('overwritewebroot')[info]and[debug]logging here where appropriate/helpfulTest Results:
index.php(from my branch) correctly handles the updater links (which I had previously manually verified in Webbased Nextcloud updater fails in reverse proxy scenario with / vs. /something #265 (comment)