We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b9c69e commit e8f78f2Copy full SHA for e8f78f2
forward/forwardproxy.go
@@ -18,6 +18,7 @@ import (
18
"bufio"
19
"bytes"
20
"encoding/base64"
21
+ "errors"
22
"fmt"
23
"io"
24
"net"
@@ -96,6 +97,14 @@ func (cp *CoreProxy) Cleanup() error {
96
97
return cp.policyManager.Stop()
98
}
99
100
+func (cp *CoreProxy) HandleHealthCheck(w http.ResponseWriter, r *http.Request) error {
101
+ if r.Method != http.MethodGet {
102
+ return utils.NewHandlerError(http.StatusMethodNotAllowed, errors.New("HTTP GET allowed only"))
103
+ }
104
+ w.WriteHeader(http.StatusOK)
105
+ return nil
106
+}
107
+
108
func (cp *CoreProxy) HandlePolicyPath(w http.ResponseWriter, r *http.Request) error {
109
return cp.policyManager.ServeHTTP(w, r)
110
0 commit comments