Open sjparkinson opened 5 years ago
More than happy to submit a PR for this if there is interest.
Thanks. This sounds really useful in theory.
Couple of questions:
config.json
or ENV variables?* Can heroku sites block all traffic except for whitelisted IPs?
Interesting question. Not out of the box. However I would imagine there is a Buildpack out there that we could make use of. I'll have a look around.
* How would this work with specify a `config.json` or ENV variables?
Environment variables are covered, and a configuration file I will have a look at how it works in this project first.
Interesting question. Not out of the box. However I would imagine there is a Buildpack out there that we could make use of. I'll have a look around.
There is one robust answer to this which would be to provision the Heroku app inside a Heroku Private Space.
https://www.heroku.com/private-spaces
That would allow IP access lists to be defined and managed within Heroku, no maintenance required. There is an increased cost associated with provisioning an app in a Private Space however.
Spend Alert. Each Heroku Private Space costs $1000 in Add-on Credits/month (pro-rated to the second).
Buildpack wise, the route seems to be using an nginx based Buildpack configured with a list of IPs from a file. However the ones I've found all deal with static sites only. I'll dig into what one that supports this project would look like.
Configuration wise, looks like this would work just fine with the way the Heroku Deploy button supports asking for environment variables.
See https://devcenter.heroku.com/articles/heroku-button.
This button would live on the
README.md
and look something like:Pressing it would allow anyone with a Heroku account to quickly set up a new Pa11y dashboard.