Lando will automatically try to real-time scan all
proxy URLs as your app starts up. We do this to:
- Provide some immediate feedback to the user regarding the health of their application and the routing that Lando has set up for it
- Help compile first-run application caches behind the scenes to improve initial loaded-in-browser speed
The results of the scan will be coded:
- GREEN - Scan passed and you are good to go!
- YELLOW - Scan was skipped or not attempted
- RED - ComScan has detected there may be a problem with your networking, routing or application
By default the scanner will request
/ for each URL a service exposes. By default it will pass for any valid
404 response code and it will retry 25 times with a slight backoff per retry. It will not follow redirects.
We realize there are legitimate use cases where you may not want the above behavior. For example you may have purposefully set up your application to emit a naughty status code. For these use cases, see the configuration options below:
Why Accept 404s?
Some applications initially serve a
404 page after successful startup - hence why Lando's scanner has always accepted
404 as a valid response code.
When we updated the scanner in Lando 3.14.0, we tried to keep behavior as consistent as possible with the legacy scanner. This behavior may change in future releases and can be customized if it does not suit your use case.
If you would like to bypass scanning altogether then just set
false. This will cause the scan to immediately pass. The URL will show up as yellow do denote it has been skipped.
Adding OK codes
Some applications start up serving alternate non
2XX response codes. For example, some PHP frameworks will serve a
404 page by default. For that reason, we've added the following codes as default valid
okCodes in Lando:
However, if you want to explicitly redefine the response codes that Lando will interpret as "OK", you can overwrite them for a given service in your Landofile:
Scanning an alternate path
Similarly you may have a designated "healthcheck" path that you'd prefer to scan instead of
/. Not a problem:
You can also change the amount of time to wait for a request, the number of retries and the number of redirects to follow.
Using the legacy scanner
You can also elect to use the legacy pre-3.14.0 scanner by editing the Lando global configuration.
Alternatively you can use the legacy scanner by setting the environment variable
legacy. Here is a use-at-start example:
LANDO_SCANNER=legacy lando start
You can see whether the legacy scanner is being used with
lando config and looking for the
Note that the key will only be set if you elected to use the
LANDO_SCANNER=legacy lando config --path scanner