lando / lagoon

The Official Lagoon Lando Plugin
https://docs.lando.dev/lagoon
GNU General Public License v3.0
3 stars 4 forks source link

Lagoon integration does not work with custom domains #20

Open serhat-ozkara opened 2 years ago

serhat-ozkara commented 2 years ago

https://github.com/lando/lagoon/blob/5589e63e622ee895399408ff90678197b13a01aa/lib/api.js#L59

serhat-ozkara commented 2 years ago

This assumes all Lagoon instances are using api.(domain) and ssh.(domain) but one can use whatever domain for said lagoon services

labboy0276 commented 2 years ago

@serhat-ozkara can you specify more about your use case, what urls you are trying to use and why. This will us get a better picture of what is going on.

serhat-ozkara commented 2 years ago

Hello @labboy0276,

When using custom lagoon environments, lagoon does not necessarily have to use ssh.mydomain.com or api.mydomain.com subdomains. One can use my-own-sobdomain.mydomain.com for SSH address and my-other-subdomain.mydomain.com for API endpoint.

But on api.js file, it is assumed that lagoon SSH is hosted on SSH.mydomain.com and API endpoint on api.mydomain.com.

So, sharing the domain on ${this.host} for SSH and API endpoints for Lagoon integration, incorrectly assumes this approach. Users should be able to set their own addresses and domains for SSH and API endpoint addresses and ports.

Hardcoding subdomains like this: https://api.${this.host}; or ssh.${this.host}; limits the usability.

Thanks,

labboy0276 commented 2 years ago

@serhat-ozkara ok this is something we can do in the future. Most likely in Lando 4.