remove session handling from main
This commit is contained in:
parent
1d6b22606a
commit
0563f1f3e0
9
main.go
9
main.go
|
@ -45,15 +45,6 @@ func (l Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
log.Print(r.URL.Path, ";", time.Since(start))
|
||||
}
|
||||
|
||||
func check_valid_session(w http.ResponseWriter, r *http.Request) bool {
|
||||
if r.URL.Path == "/admin/login" {
|
||||
return true
|
||||
}
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
fmt.Fprint(w, "No session found!")
|
||||
return false
|
||||
}
|
||||
|
||||
func main() {
|
||||
var config_path string
|
||||
flag.StringVar(&config_path, "config", "config.yml", "path to the config file")
|
||||
|
|
Loading…
Reference in New Issue