diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-06-05 09:53:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 09:53:53 +0200 |
commit | cf38c73f53bd7f2093d4ae34a9c324f5e915b7c8 (patch) | |
tree | 2e4b0efc37642330dadc1b68358e88f069bae3a6 /go.mod | |
parent | 536bf71abe861a74354a62eb880529a44434a4fa (diff) |
commands: Add TLS/HTTPS support to hugo server
* commands: Add TLS/HTTPS support to hugo server
The "auto cert" handling in this PR is backed by mkcert (see link below).
To get this up and running on a new PC, you can:
```
hugo server trust
hugo server --tlsAuto
```
When `--tlsAuto` (or `--tlsCertFile` and `--tlsKeyFile`) is set and no `--baseURL` is provided as a flag, the server is
started with TLS and `https` as the protocol.
Note that you only need to run `hugo server trust` once per PC.
If you already have the key and the cert file (e.g. by using mkcert directly), you can do:
```
hugo server --tlsCertFile mycert.pem --tlsKeyFile mykey.pem
```
See https://github.com/FiloSottile/mkcert
Fixes #11064
Diffstat (limited to 'go.mod')
-rw-r--r-- | go.mod | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -15,6 +15,7 @@ require ( github.com/bep/gowebp v0.2.0 github.com/bep/helpers v0.4.0 github.com/bep/lazycache v0.2.0 + github.com/bep/mclib v1.20400.20402 github.com/bep/overlayfs v0.6.0 github.com/bep/simplecobra v0.3.1 github.com/bep/tmc v0.5.1 @@ -125,7 +126,7 @@ require ( github.com/perimeterx/marshmallow v1.1.4 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.3.0 // indirect + golang.org/x/crypto v0.9.0 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/oauth2 v0.7.0 // indirect golang.org/x/sys v0.8.0 // indirect @@ -135,6 +136,8 @@ require ( google.golang.org/grpc v1.54.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + howett.net/plist v1.0.0 // indirect + software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect ) go 1.18 |