docs: changed documentation link for trusted proxies

https://github.com/gin-gonic/gin/pull/3575

Fixes more incorrect links from the linked PR.
This commit is contained in:
Cale Flatley 2023-07-17 22:27:05 -04:00 committed by GitHub
parent d4a64265f2
commit 79846244ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

4
gin.go
View File

@ -378,7 +378,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.")
}
address := resolveAddress(addr)
@ -499,7 +499,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.")
}
err = http.ListenAndServeTLS(addr, certFile, keyFile, engine.Handler())