Skip to content

Instantly share code, notes, and snippets.

@kerasai
Created March 10, 2025 22:07
Show Gist options
  • Save kerasai/26828f50fc6c12d1ce711c1d6965a1f5 to your computer and use it in GitHub Desktop.
Save kerasai/26828f50fc6c12d1ce711c1d6965a1f5 to your computer and use it in GitHub Desktop.
Lando - Add Basic Auth

In .lando.yml:

proxy:
  appserver:
    - hostname: mysite.lndo.site
      middlewares:
        - name: CanBeAnything
          key: 'basicauth.users'
          value: 'lando:$$apr1$$5HI8Qwxp$$2/jNlE4mlQA0JPWblBSfy1'

Required a lando rebuild to take affect.

Accepts multiple htpasswd type user/password combinations, comma-separated.

Create the password hash: echo $(htpasswd -nB [user]) | sed -e s/\\$/\\$\\$/g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment