Skip to content

Commit

Permalink
docs(gin): update link to dont-trust-all-proxies section (#3938) (#3945)
Browse files Browse the repository at this point in the history
  • Loading branch information
codespearhead committed May 7, 2024
1 parent 8dd0889 commit f5f5da8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gin.go
Expand Up @@ -391,7 +391,7 @@ func (engine *Engine) Run(addr ...string) (err error) {

if engine.isUnsafeTrustedProxies() {
debugPrint("[WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.\n" +
"Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.")
"Please check https://github.com/gin-gonic/gin/blob/master/docs/doc.md#dont-trust-all-proxies for details.")
}

address := resolveAddress(addr)
Expand Down Expand Up @@ -512,7 +512,7 @@ func (engine *Engine) RunTLS(addr, certFile, keyFile string) (err error) {

if engine.isUnsafeTrustedProxies() {
debugPrint("[WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.\n" +
"Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.")
"Please check https://github.com/gin-gonic/gin/blob/master/docs/doc.md#dont-trust-all-proxies for details.")
}

err = http.ListenAndServeTLS(addr, certFile, keyFile, engine.Handler())
Expand Down

0 comments on commit f5f5da8

Please sign in to comment.