summaryrefslogtreecommitdiff
path: root/handlers/proxy.go
diff options
context:
space:
mode:
authorhaturatu <taro@eyes4you.org>2025-10-12 17:04:07 +0900
committerhaturatu <taro@eyes4you.org>2025-10-12 17:04:07 +0900
commit957dc75eddf69ccf26bd387828b9e205a5425f30 (patch)
tree15a3f5581dded804a383c1d42e5b7d4b967da11e /handlers/proxy.go
parent10c90d8654b94916bf0a4ffb8263e512a8e6be04 (diff)
add(api): api endpoint authorized Bearer token
Diffstat (limited to 'handlers/proxy.go')
-rw-r--r--handlers/proxy.go4
1 files changed, 2 insertions, 2 deletions
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
+}