Settings are now given through TEAMS/settings.json instead of been given through command line arguments
This commit is contained in:
parent
b1541d9a45
commit
fae97e5411
9 changed files with 210 additions and 70 deletions
|
@ -7,6 +7,8 @@ import (
|
|||
"text/template"
|
||||
)
|
||||
|
||||
var enableResolutionRoute bool = false
|
||||
|
||||
type ResolutionHandler struct {}
|
||||
|
||||
const resolutiontpl = `<!DOCTYPE html>
|
||||
|
@ -22,6 +24,12 @@ const resolutiontpl = `<!DOCTYPE html>
|
|||
`
|
||||
|
||||
func (s ResolutionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
if !enableResolutionRoute {
|
||||
log.Printf("UNHANDELED %s request from %s: /resolution%s [%s]\n", r.Method, r.RemoteAddr, r.URL.Path, r.UserAgent())
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("Handling %s request from %s: /resolution%s [%s]\n", r.Method, r.RemoteAddr, r.URL.Path, r.UserAgent())
|
||||
|
||||
w.Header().Set("Content-Type", "text/html")
|
||||
|
|
Reference in a new issue