Skip to content

Commit

Permalink
allow connections to be logged in the log file
Browse files Browse the repository at this point in the history
  • Loading branch information
Pouyan Azari committed Jun 18, 2019
1 parent 3883f79 commit 87f9554
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ import (
)

func probeHandler(w http.ResponseWriter, r *http.Request, configs LoginConfigs) {

// Logs all the connections
logger.WithFields(
log.Fields{
"subsytem": "probe_handler",
"part": "connection_info",
"user_address": r.RemoteAddr,
"server_host": r.Host,
"user_agent": r.UserAgent(),
}).Info("This connection was established")

var loginType = ""
// Extract the target from the url
target := r.URL.Query().Get("target")
Expand Down

0 comments on commit 87f9554

Please sign in to comment.