默认加白出口ip

This commit is contained in:
bjdgyc
2024-02-19 17:11:25 +08:00
parent d73816a811
commit 29a3e4bfb3
5 changed files with 26 additions and 15 deletions

View File

@@ -6,6 +6,7 @@ import (
"io"
"net"
"net/http"
"net/http/httputil"
"os"
"time"
@@ -116,8 +117,10 @@ func initRoute() http.Handler {
func notFound(w http.ResponseWriter, r *http.Request) {
// fmt.Println(r.RemoteAddr)
// hu, _ := httputil.DumpRequest(r, true)
// fmt.Println("NotFound: ", string(hu))
if base.GetLogLevel() == base.LogLevelTrace {
hd, _ := httputil.DumpRequest(r, true)
base.Trace("NotFound: ", string(hd))
}
w.WriteHeader(http.StatusNotFound)
fmt.Fprintln(w, "404 page not found")