Conversation
Every new Wings(...) call in this controller omits the 6th $behindProxy constructor argument, so it always defaults to false regardless of the node's actual behind_proxy DB value. This makes Wings API calls always append the raw daemon port to the URL instead of respecting "Behind Proxy", causing connection failures (cURL error 7: Failed to connect ... port <daemonListen>) for any node running behind a reverse proxy — even when correctly configured. Pass WingsUrlHelper::isBehindProxy($node) through on all 10 call sites, matching what Wings::fromNode() already does correctly.
Same issue as WingsAdminController - turns out it's not just that one file, every new Wings(...) call across the codebase (chatbot tools, server controllers, backup/power/logs controllers, node controllers, etc) has the same missing 6th argument and defaults behindProxy to false. Fixed all of them the same way, using WingsUrlHelper::isBehindProxy() with whatever the node variable is called in each spot ($node, $nodeInfo, $sourceNode, $destinationNode). This was blocking basically anything that talks to a proxied node - creating a server, backups, power actions, chatbot tools, etc all hit the same wrong port.
A few of the call sites had a trailing inline comment on the timeout line (e.g. "10 // Short timeout for status checks"), and my earlier fix appended the comma after the comment instead of before it - so the comment swallowed the comma and PHP saw two args with nothing separating them. Fixed by moving the comma before the comment on those 4 lines. CompressFilesTool and DecompressArchiveTool had a different issue: their original calls only had 4 args (no timeout, no behindProxy), so the patch landed the new arg in the timeout slot instead of adding a 6th one, and somehow ended up duplicated on top of that. Fixed by putting an explicit 30 back in the timeout slot and keeping just one WingsUrlHelper::isBehindProxy($node) after it. Ran php -l on all 31 changed files, all clean now.
…ehind-proxy fix: behind_proxy setting ignored across ~30 files, not just WingsAdminController
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
No description provided.