mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-12 09:00:54 +00:00
Fix the LE handler, serve 404s
This commit is contained in:
parent
121298af0e
commit
3e956ba456
1 changed files with 6 additions and 1 deletions
|
@ -69,8 +69,8 @@ func SetupServerAndHandle(config *ConfigFile, serveMux *http.ServeMux) {
|
||||||
BannerHTML = bannerBytes
|
BannerHTML = bannerBytes
|
||||||
|
|
||||||
serveMux.HandleFunc("/", HTTPHandleRootURL)
|
serveMux.HandleFunc("/", HTTPHandleRootURL)
|
||||||
|
serveMux.Handle("/.well-known/", http.FileServer(http.FileSystem(http.Dir("/tmp/letsencrypt/"))))
|
||||||
serveMux.HandleFunc("/stats", HTTPShowStatistics)
|
serveMux.HandleFunc("/stats", HTTPShowStatistics)
|
||||||
serveMux.Handle("/.well-known", http.FileServer(http.FileSystem(http.Dir("/tmp/letsencrypt/.well-known"))))
|
|
||||||
|
|
||||||
serveMux.HandleFunc("/drop_backlog", HTTPBackendDropBacklog)
|
serveMux.HandleFunc("/drop_backlog", HTTPBackendDropBacklog)
|
||||||
serveMux.HandleFunc("/uncached_pub", HTTPBackendUncachedPublish)
|
serveMux.HandleFunc("/uncached_pub", HTTPBackendUncachedPublish)
|
||||||
|
@ -114,6 +114,11 @@ var BannerHTML []byte
|
||||||
// HTTPHandleRootURL is the http.HandleFunc for requests on `/`.
|
// HTTPHandleRootURL is the http.HandleFunc for requests on `/`.
|
||||||
// It either uses the SocketUpgrader or writes out the BannerHTML.
|
// It either uses the SocketUpgrader or writes out the BannerHTML.
|
||||||
func HTTPHandleRootURL(w http.ResponseWriter, r *http.Request) {
|
func HTTPHandleRootURL(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.URL.Path != "/" {
|
||||||
|
http.NotFound(w, r)
|
||||||
|
fmt.Println(404)
|
||||||
|
return
|
||||||
|
}
|
||||||
if r.Header.Get("Connection") == "Upgrade" {
|
if r.Header.Get("Connection") == "Upgrade" {
|
||||||
updateSysMem()
|
updateSysMem()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue