From d1997e1e2aebbc3f28b1eb3ff4fd381b6142f533 Mon Sep 17 00:00:00 2001 From: rxdn <29165304+rxdn@users.noreply.github.com> Date: Sun, 10 Sep 2023 17:51:17 +0100 Subject: [PATCH] Proxy whitelabel / bearer requests --- utils/proxyhook.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/utils/proxyhook.go b/utils/proxyhook.go index 6f76ce8..ddc2706 100644 --- a/utils/proxyhook.go +++ b/utils/proxyhook.go @@ -3,14 +3,11 @@ package utils import ( "github.com/TicketsBot/GoPanel/config" "net/http" - "os" ) // Twilight's HTTP proxy doesn't support the typical HTTP proxy protocol - instead you send the request directly // to the proxy's host in the URL. This is not how Go's proxy function should be used, but it works :) func ProxyHook(token string, req *http.Request) { - if token == os.Getenv("WORKER_PUBLIC_TOKEN") { - req.URL.Scheme = "http" - req.URL.Host = config.Conf.Bot.ProxyUrl - } + req.URL.Scheme = "http" + req.URL.Host = config.Conf.Bot.ProxyUrl }