GitHub Readme.md
Fork of the original heroku-buildpack-static with added feature of enabling Basic HTTP Authentification for semi-private environments (staging, development).
To enable basic auth, add "basic_auth": true
to the static.json
configuration file of the buildpack. Other options can be found on the README of the original repo.
If enabled, you also need to set a BASIC_AUTH_USERNAME
and a BASIC_AUTH_PASSWORD
in the environment's config variables, either usign the Heroku CLI (heroku config:set BASIC_AUTH_USERNAME=alex
) or the Heroku web interface.
Generate a valid htpasswd username and password from this generator. For example, if your valid .htpassword
file looks like this: alex:$apr1$2orC2Rt7$p1vLgzcDZoqaF7YDu4DHK0
, your environment variables should be BASIC_AUTH_USERNAME=alex
and BASIC_AUTH_PASSWORD=$apr1$2orC2Rt7$p1vLgzcDZoqaF7YDu4DHK0
.
To use this buildpack, change the buildpack for the Heroku app to https://github.com/daubechies/heroku-buildpack-static.git
.
Copy the snippet above into CLI.