mirror of
https://github.com/believethehype/nostdress.git
synced 2026-07-26 15:38:10 -07:00
Merge pull request #26 from Perlover/perlover/patch-1
Fix of: If ALLOW_API is false then server is not run
This commit is contained in:
@@ -279,18 +279,17 @@ func main() {
|
||||
api.HandleFunc("/users/{name}@{domain}", GetUser).Methods("GET")
|
||||
api.HandleFunc("/users/{name}@{domain}", UpdateUser).Methods("PUT")
|
||||
api.HandleFunc("/users/{name}@{domain}", DeleteUser).Methods("DELETE")
|
||||
|
||||
srv := &http.Server{
|
||||
Handler: cors.Default().Handler(router),
|
||||
Addr: s.Host + ":" + s.Port,
|
||||
WriteTimeout: 15 * time.Second,
|
||||
ReadTimeout: 15 * time.Second,
|
||||
}
|
||||
log.Debug().Str("addr", srv.Addr).Msg("listening")
|
||||
|
||||
srv.ListenAndServe()
|
||||
|
||||
}
|
||||
|
||||
srv := &http.Server{
|
||||
Handler: cors.Default().Handler(router),
|
||||
Addr: s.Host + ":" + s.Port,
|
||||
WriteTimeout: 15 * time.Second,
|
||||
ReadTimeout: 15 * time.Second,
|
||||
}
|
||||
log.Debug().Str("addr", srv.Addr).Msg("listening")
|
||||
|
||||
srv.ListenAndServe()
|
||||
}
|
||||
|
||||
func getDomains(s string) []string {
|
||||
|
||||
Reference in New Issue
Block a user