mirror of
https://github.com/labstack/echo.git
synced 2024-11-28 08:38:39 +02:00
Updated deps and docs
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
069e80b9e0
commit
e8910be0ac
@ -3,15 +3,17 @@ package main
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"golang.org/x/crypto/acme/autocert"
|
||||||
|
|
||||||
"github.com/labstack/echo"
|
"github.com/labstack/echo"
|
||||||
"github.com/labstack/echo/middleware"
|
"github.com/labstack/echo/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
e := echo.New()
|
e := echo.New()
|
||||||
// e.AutoTLSManager.HostPolicy = autocert.HostWhitelist("<your_domain>")
|
// e.AutoTLSManager.HostPolicy = autocert.HostWhitelist("<DOMAIN>")
|
||||||
// Store the certificate to avoid issues with rate limits (https://letsencrypt.org/docs/rate-limits/)
|
// Cache certificates
|
||||||
// e.AutoTLSManager.Cache = autocert.DirCache("<path to store key and certificate>")
|
e.AutoTLSManager.Cache = autocert.DirCache("/var/www/.cache")
|
||||||
e.Use(middleware.Recover())
|
e.Use(middleware.Recover())
|
||||||
e.Use(middleware.Logger())
|
e.Use(middleware.Logger())
|
||||||
e.GET("/", func(c echo.Context) error {
|
e.GET("/", func(c echo.Context) error {
|
||||||
|
12
glide.lock
generated
12
glide.lock
generated
@ -1,5 +1,5 @@
|
|||||||
hash: 4a4f41416395516f7eefabd29ee5c7b065a411dec7446f6d6853d4cc28c4c644
|
hash: 4a4f41416395516f7eefabd29ee5c7b065a411dec7446f6d6853d4cc28c4c644
|
||||||
updated: 2017-01-13T18:25:37.646516032-08:00
|
updated: 2017-01-21T10:20:13.866484425-08:00
|
||||||
imports:
|
imports:
|
||||||
- name: github.com/daaku/go.zipexe
|
- name: github.com/daaku/go.zipexe
|
||||||
version: a5fe2436ffcb3236e175e5149162b41cd28bd27d
|
version: a5fe2436ffcb3236e175e5149162b41cd28bd27d
|
||||||
@ -25,7 +25,7 @@ imports:
|
|||||||
subpackages:
|
subpackages:
|
||||||
- proto
|
- proto
|
||||||
- name: github.com/gorilla/websocket
|
- name: github.com/gorilla/websocket
|
||||||
version: 17634340a83afe0cab595e40fbc63f6ffa1d8915
|
version: 2257eda00b2084c1351cd672aa5476daa9f5e463
|
||||||
- name: github.com/kardianos/osext
|
- name: github.com/kardianos/osext
|
||||||
version: c2c54e542fb797ad986b31721e1baedf214ca413
|
version: c2c54e542fb797ad986b31721e1baedf214ca413
|
||||||
- name: github.com/labstack/gommon
|
- name: github.com/labstack/gommon
|
||||||
@ -40,18 +40,18 @@ imports:
|
|||||||
- name: github.com/mattn/go-isatty
|
- name: github.com/mattn/go-isatty
|
||||||
version: 30a891c33c7cde7b02a981314b4228ec99380cca
|
version: 30a891c33c7cde7b02a981314b4228ec99380cca
|
||||||
- name: github.com/tylerb/graceful
|
- name: github.com/tylerb/graceful
|
||||||
version: d37e108c89765a8e307f15b8fb2ecd10575da6bb
|
version: 0e9129e9c6d47da90dc0c188b26bd7bb1dab53cd
|
||||||
- name: github.com/valyala/bytebufferpool
|
- name: github.com/valyala/bytebufferpool
|
||||||
version: e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7
|
version: e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7
|
||||||
- name: github.com/valyala/fasttemplate
|
- name: github.com/valyala/fasttemplate
|
||||||
version: d090d65668a286d9a180d43a19dfdc5dcad8fe88
|
version: d090d65668a286d9a180d43a19dfdc5dcad8fe88
|
||||||
- name: golang.org/x/crypto
|
- name: golang.org/x/crypto
|
||||||
version: 2f8be38b9a7533b8763d48273737ff6e90428a96
|
version: b8a2a83acfe6e6770b75de42d5ff4c67596675c0
|
||||||
subpackages:
|
subpackages:
|
||||||
- acme
|
- acme
|
||||||
- acme/autocert
|
- acme/autocert
|
||||||
- name: golang.org/x/net
|
- name: golang.org/x/net
|
||||||
version: c427ad74c6d7a814201695e9ffde0c5d400a7674
|
version: f2499483f923065a842d38eb4c7f1927e6fc6e6d
|
||||||
subpackages:
|
subpackages:
|
||||||
- context
|
- context
|
||||||
- context/ctxhttp
|
- context/ctxhttp
|
||||||
@ -61,7 +61,7 @@ imports:
|
|||||||
subpackages:
|
subpackages:
|
||||||
- unix
|
- unix
|
||||||
- name: google.golang.org/appengine
|
- name: google.golang.org/appengine
|
||||||
version: 9e2ad0873f358c54296ccdc5116b0652c98226d1
|
version: a2c54d2174c17540446e0ced57d9d459af61bc1c
|
||||||
subpackages:
|
subpackages:
|
||||||
- internal
|
- internal
|
||||||
- internal/app_identity
|
- internal/app_identity
|
||||||
|
@ -48,7 +48,7 @@ type (
|
|||||||
// Optional. Default value DefaultLoggerConfig.Format.
|
// Optional. Default value DefaultLoggerConfig.Format.
|
||||||
Format string `json:"format"`
|
Format string `json:"format"`
|
||||||
|
|
||||||
// Output is a writer where logs are written.
|
// Output is a writer where logs in JSON format are written.
|
||||||
// Optional. Default value os.Stdout.
|
// Optional. Default value os.Stdout.
|
||||||
Output io.Writer
|
Output io.Writer
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ message with TLS enabled on the website.
|
|||||||
|
|
||||||
>
|
>
|
||||||
- For added security you should specify host policy in auto TLS manager
|
- For added security you should specify host policy in auto TLS manager
|
||||||
|
- Cache certificates to avoid issues with rate limits (https://letsencrypt.org/docs/rate-limits)
|
||||||
- To redirect HTTP traffic to HTTPS, you can use [redirect middleware](/middleware/redirect#https-redirect)
|
- To redirect HTTP traffic to HTTPS, you can use [redirect middleware](/middleware/redirect#https-redirect)
|
||||||
|
|
||||||
## Server
|
## Server
|
||||||
|
Loading…
Reference in New Issue
Block a user