This commit is contained in:
2024-07-20 19:43:27 +08:00
parent 1b73e8d15c
commit 460fbba109
2 changed files with 3 additions and 2 deletions

View File

@@ -56,7 +56,8 @@ func LogComponent(startTime int64, r *http.Request) {
endTime := fmt.Sprintf(color, ms)
method := fmt.Sprintf("\033[1;32m%s\033[0m", r.Method) // 綠色加重
url := fmt.Sprintf("\033[1;34m%s\033[0m", r.URL) // 藍色加重
log.Println(method, url, endTime)
log.Println(method, url, endTime, r.Header.Get("X-Forwarded-For"))
}
type Image struct {