File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import (
1111)
1212
1313// Main handler
14- func handleProxy (w http.ResponseWriter , r * http.Request ) {
14+ func HandleProxy (w http.ResponseWriter , r * http.Request ) {
1515 // Auth first
1616 if ! checkAuth (r ) {
1717 w .Header ().Set ("Proxy-Authenticate" , `Basic realm="Restricted"` )
@@ -142,7 +142,7 @@ func callAndLogError(f func() error) {
142142func main () {
143143 server := & http.Server {
144144 Addr : ":8080" , // listen on port 8080
145- Handler : http .HandlerFunc (handleProxy ),
145+ Handler : http .HandlerFunc (HandleProxy ),
146146 }
147147
148148 // Check if port is available
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ func TestHandleRequestAndRedirect(t *testing.T) {
7676 t .Setenv ("PROXY_USER" , "test-user" )
7777 t .Setenv ("PROXY_PASS" , "valid-pass" )
7878
79- handleProxy (rr , req )
79+ HandleProxy (rr , req )
8080
8181 res := rr .Result ()
8282
You can’t perform that action at this time.
0 commit comments