Skip to content

Commit e455de2

Browse files
feat: add audit
1 parent 2ed4f9a commit e455de2

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

proxy/proxy.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ func (p *Server) handleHTTPConnection(conn net.Conn) {
177177
result := p.ruleEngine.Evaluate(req.Method, req.Host)
178178

179179
// Audit the request
180-
//p.auditor.AuditRequest(audit.Request{
181-
// Method: req.Method,
182-
// URL: req.URL.String(),
183-
// Allowed: result.Allowed,
184-
// Rule: result.Rule,
185-
//})
180+
p.auditor.AuditRequest(audit.Request{
181+
Method: req.Method,
182+
URL: req.URL.String(),
183+
Allowed: result.Allowed,
184+
Rule: result.Rule,
185+
})
186186

187187
if !result.Allowed {
188188
p.writeBlockedResponse(conn, req)
@@ -227,12 +227,12 @@ func (p *Server) handleTLSConnection(conn net.Conn) {
227227
result := p.ruleEngine.Evaluate(req.Method, req.Host)
228228

229229
// Audit the request
230-
//p.auditor.AuditRequest(audit.Request{
231-
// Method: req.Method,
232-
// URL: req.URL.String(),
233-
// Allowed: result.Allowed,
234-
// Rule: result.Rule,
235-
//})
230+
p.auditor.AuditRequest(audit.Request{
231+
Method: req.Method,
232+
URL: req.URL.String(),
233+
Allowed: result.Allowed,
234+
Rule: result.Rule,
235+
})
236236

237237
if !result.Allowed {
238238
p.writeBlockedResponse(tlsConn, req)

0 commit comments

Comments
 (0)