Skip to content

fix: include non-standard proxy port in drush_uri#180

Merged
AaronFeledy merged 2 commits intomainfrom
fix/drush-uri-port
Feb 22, 2026
Merged

fix: include non-standard proxy port in drush_uri#180
AaronFeledy merged 2 commits intomainfrom
fix/drush-uri-port

Conversation

@AaronFeledy
Copy link
Copy Markdown
Member

@AaronFeledy AaronFeledy commented Feb 21, 2026

When the Lando proxy falls back to a non-standard port (e.g. 444 instead of 443), the automatically derived drush_uri now includes the port in the URL.

Previously DRUSH_OPTIONS_URI would be set to https://myapp.lndo.site even when the proxy was running on port 444, causing Drush to hit the wrong port. Now it correctly produces https://myapp.lndo.site:444.

Uses proxyLastPorts from Lando's proxy cache to detect the active port at config time.


Note

Low Risk
Small, localized change to derived environment variable construction; risk is limited to incorrect URI generation if proxy port detection is wrong or missing.

Overview
When drush_uri isn’t explicitly set, _drupaly now builds DRUSH_OPTIONS_URI from the active proxy URL including a non-standard port (e.g. :444) by reading _app._config.proxyLastPorts and only appending the port when it differs from the default for the chosen protocol.

This replaces the previous behavior that always emitted a portless http(s)://<proxyUrl> when inferring the URI from proxy settings.

Written by Cursor Bugbot for commit c425a76. This will update automatically on new commits. Configure here.

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 21, 2026

Deploy Preview for lando-drupal ready!

Name Link
🔨 Latest commit c425a76
🔍 Latest deploy log https://app.netlify.com/projects/lando-drupal/deploys/699a287e87ed460008a03be7
😎 Deploy Preview https://deploy-preview-180--lando-drupal.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 87 (🔴 down 6 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

Comment thread builders/_drupaly.js Outdated
@cursor
Copy link
Copy Markdown

cursor Bot commented Feb 21, 2026

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: Strict comparison may fail with numeric port values
    • Changed string literals '443' and '80' to numeric literals 443 and 80 to correctly handle numeric port values from Lando's proxy cache.

View PR

Or push these changes by commenting:

@cursor push f6c32c1dd1
Preview (f6c32c1dd1)
diff --git a/builders/_drupaly.js b/builders/_drupaly.js
--- a/builders/_drupaly.js
+++ b/builders/_drupaly.js
@@ -305,7 +305,7 @@
           let port = '';
           if (ports) {
             const activePort = ssl ? ports.https : ports.http;
-            if (activePort && ((ssl && activePort !== '443') || (!ssl && activePort !== '80'))) {
+            if (activePort && ((ssl && activePort !== 443) || (!ssl && activePort !== 80))) {
               port = `:${activePort}`;
             }
           }

@AaronFeledy
Copy link
Copy Markdown
Member Author

@cursor push f6c32c1

@AaronFeledy AaronFeledy merged commit f12243f into main Feb 22, 2026
48 checks passed
@AaronFeledy AaronFeledy deleted the fix/drush-uri-port branch February 22, 2026 02:48
@cursor cursor Bot mentioned this pull request Feb 22, 2026
9 tasks
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.

2 participants