log
This commit is contained in:
@@ -146,6 +146,7 @@ func (h *RemoteHost) AnnounceExpiry(uids []uint64) {
|
|||||||
func (h *RemoteHost) Proxy(id uint64, w http.ResponseWriter, r *http.Request) (bool, error) {
|
func (h *RemoteHost) Proxy(id uint64, w http.ResponseWriter, r *http.Request) (bool, error) {
|
||||||
target := fmt.Sprintf("%s%s", h.httpBase, r.URL.RequestURI())
|
target := fmt.Sprintf("%s%s", h.httpBase, r.URL.RequestURI())
|
||||||
|
|
||||||
|
log.Printf("proxy target: %s, method: %s", target, r.Method)
|
||||||
req, err := http.NewRequestWithContext(r.Context(), r.Method, target, r.Body)
|
req, err := http.NewRequestWithContext(r.Context(), r.Method, target, r.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, "proxy build error", http.StatusBadGateway)
|
http.Error(w, "proxy build error", http.StatusBadGateway)
|
||||||
|
|||||||
Reference in New Issue
Block a user