mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 19:27:07 +02:00
added load balance support and verbose level
This commit is contained in:
7
src/go-proxy/panel.go
Normal file → Executable file
7
src/go-proxy/panel.go
Normal file → Executable file
@@ -2,14 +2,13 @@ package main
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
const templateFile = "/app/templates/panel.html"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
var healthCheckHttpClient = &http.Client{
|
||||
Timeout: 5 * time.Second,
|
||||
@@ -72,7 +71,7 @@ func panelCheckTargetHealth(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
url, err := url.Parse(targetUrl)
|
||||
if err != nil {
|
||||
log.Printf("[Panel] failed to parse %s, error: %v", targetUrl, err)
|
||||
glog.Infof("[Panel] failed to parse %s, error: %v", targetUrl, err)
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user