- install
asdf
version manager - add golang plugin
asdf plugin-add golang
- add
asdf
to bash profile (osx)echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bash_profile echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile
asdf
version managerasdf plugin-add golang
asdf
to bash profile (osx)
echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bash_profile
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile
I hereby claim:
To claim this, I am signing this object:
exports.handler = (event, context, done) => { | |
const response = event.Records[0].cf.response; | |
const headers = response.headers; | |
if(headers['edge-www-authenticate']) { | |
headers['www-authenticate'] = [{key: 'WWW-Authenticate', value: 'Basic realm="Secure Area"'}]; | |
delete headers['edge-www-authenticate']; | |
} | |
done(null, response); |
There are two main modes to run the Let's Encrypt client (called Certbot
):
Webroot is better because it doesn't need to replace Nginx (to bind to port 80).
In the following, we're setting up mydomain.com
.
HTML is served from /var/www/mydomain
, and challenges are served from /var/www/letsencrypt
.
"use strict"; | |
exports.handler = (event, context, callback) => { | |
/* | |
1. lets-encrypt certbot | |
> ./certbot-auto certonly -a manual --rsa-key-size 2048 -d [domain] | |
> | |
> | |
> | |
2. paste the challenge string in the context.succeed response below |