logging and client info parsing changes, added trusted proxies
This commit is contained in:
@@ -5,25 +5,28 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
var LogFile *os.File
|
||||
|
||||
type Config struct {
|
||||
// general
|
||||
LogLevel string `json:"logLevel"`
|
||||
Timezone string `json:"timezone"`
|
||||
LogFilePath string `json:"logFilePath"`
|
||||
LogLevel string `json:"logLevel"`
|
||||
LogLevelNumeric int
|
||||
LogFilePath string `json:"logFilePath"`
|
||||
|
||||
// latex
|
||||
LatexEngine string `json:"latexEngine"`
|
||||
LatexSourceFilePath string `json:"latexSourceFilePath"`
|
||||
LatexOutputPath string `json:"latexOutputPath"`
|
||||
LatexEngine string `json:"latexEngine"`
|
||||
LatexSourceFilePath string `json:"latexSourceFilePath"`
|
||||
LatexOutputPath string `json:"latexOutputPath"`
|
||||
|
||||
// webserver
|
||||
WebserverDomain string `json:"webserverDomain"`
|
||||
WebserverPort string `json:"webserverPort"`
|
||||
WebserverSecure bool `json:"webserverSecure"`
|
||||
WebserverPortSecure string `json:"webserverPortSecure"`
|
||||
CertificatePath string `json:"certificatePath"`
|
||||
CertificateKeyPath string `json:"certificateKeyPath"`
|
||||
Timezone string `json:"timezone"`
|
||||
WebserverDomain string `json:"webserverDomain"`
|
||||
WebserverPort string `json:"webserverPort"`
|
||||
WebserverSecure bool `json:"webserverSecure"`
|
||||
WebserverPortSecure string `json:"webserverPortSecure"`
|
||||
CertificatePath string `json:"certificatePath"`
|
||||
CertificateKeyPath string `json:"certificateKeyPath"`
|
||||
TrustedProxies []string `json:"trustedProxies"`
|
||||
}
|
||||
var AppConfig Config
|
||||
|
||||
@@ -37,5 +40,12 @@ type LatexExecution struct {
|
||||
}
|
||||
var LatexExec LatexExecution
|
||||
|
||||
var LogFile *os.File
|
||||
type ClientInfo struct {
|
||||
ClientIP string
|
||||
RequestType string
|
||||
RequestPath string
|
||||
Proxy string
|
||||
Proxied bool
|
||||
ProxyTrusted bool
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user