Add logging filter token
The token is used to filter out request logs when the user agent matches a randomly generated string.
This commit is contained in:

committed by
Sebastian Serth

parent
221a6ff1b2
commit
57590457a8
@ -9,6 +9,17 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// UserAgentOut for outgoing requests (without libraries). The Git Hash will be replaced by main.go.
|
||||
UserAgentOut = "Poseidon/" + UserAgentVCSPlaceholder + " Go-http-client/1.1"
|
||||
UserAgentFiltered = "Poseidon/" + UserAgentVCSPlaceholder + " (" + UserAgentFilterTokenPlaceholder + ") Go-http-client/1.1"
|
||||
)
|
||||
|
||||
const (
|
||||
UserAgentVCSPlaceholder = "<7 Git Hash>"
|
||||
UserAgentFilterTokenPlaceholder = "FilterToken"
|
||||
)
|
||||
|
||||
// RunnerRequest is the expected json structure of the request body for the ProvideRunner function.
|
||||
type RunnerRequest struct {
|
||||
ExecutionEnvironmentID int `json:"executionEnvironmentId"`
|
||||
|
Reference in New Issue
Block a user