mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-15 21:06:39 +08:00
Merge 79846244ca873b9ef721fc790e12e6c38f25bee0 into 0397e5e0c0f8f8176c29f7edd8f1bff8e45df780
This commit is contained in:
commit
4ff923f29c
4
gin.go
4
gin.go
@ -391,7 +391,7 @@ func (engine *Engine) Run(addr ...string) (err error) {
|
|||||||
|
|
||||||
if engine.isUnsafeTrustedProxies() {
|
if engine.isUnsafeTrustedProxies() {
|
||||||
debugPrint("[WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.\n" +
|
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)
|
address := resolveAddress(addr)
|
||||||
@ -512,7 +512,7 @@ func (engine *Engine) RunTLS(addr, certFile, keyFile string) (err error) {
|
|||||||
|
|
||||||
if engine.isUnsafeTrustedProxies() {
|
if engine.isUnsafeTrustedProxies() {
|
||||||
debugPrint("[WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.\n" +
|
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())
|
err = http.ListenAndServeTLS(addr, certFile, keyFile, engine.Handler())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user