From 957dc75eddf69ccf26bd387828b9e205a5425f30 Mon Sep 17 00:00:00 2001 From: haturatu Date: Sun, 12 Oct 2025 17:04:07 +0900 Subject: add(api): api endpoint authorized Bearer token --- handlers/proxy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'handlers/proxy.go') diff --git a/handlers/proxy.go b/handlers/proxy.go index bc31059..602fc78 100644 --- a/handlers/proxy.go +++ b/handlers/proxy.go @@ -19,7 +19,7 @@ func NewProxy(targetURL string) http.Handler { // The default director is mostly fine, but we want to log and ensure the Host header is correct. director := proxy.Director proxy.Director = func(req *http.Request) { - director(req) // Run the default director + director(req) // Run the default director req.Host = target.Host // Set the Host header to the target's host // Log the proxying action @@ -35,4 +35,4 @@ func NewProxy(targetURL string) http.Handler { } return proxy -} \ No newline at end of file +} -- cgit v1.2.3