Skip to content
Snippets Groups Projects
Unverified Commit 53355cff authored by Max Adamo's avatar Max Adamo
Browse files

feat: add additional URL endpoints

parent 8139fdd3
No related branches found
No related tags found
No related merge requests found
......@@ -169,25 +169,27 @@ Options:
} else {
InfoLogger.Printf("Starting ACME Web server")
}
for _, provider := range acmeProviders {
baseURLs = append(baseURLs, "/"+provider, "/"+provider+"/")
}
for _, provider := range acmeProviders {
otherURLs = append(otherURLs, "/"+provider+"/by_name.html", "/"+provider+"/by_date.html")
}
for _, provider := range acmeProviders {
apiURLs = append(
apiURLs, "/api/"+provider, "/api/"+provider+"/",
"/api/"+provider+"/"+provider+".json", "/api/"+provider+"/"+provider+"_expired.json",
)
}
for _, provider := range acmeProviders {
otherURLs = append(otherURLs, "/"+provider+"/by_name.html", "/"+provider+"/by_date.html")
if verboseBool {
DebugLogger.Printf("Serving baseURLs: %v", baseURLs)
DebugLogger.Printf("Serving apiURLs: %v", apiURLs)
DebugLogger.Printf("Serving otherURLs: %v", otherURLs)
}
puppetURL := "/puppet"
fs := http.FileServer(http.Dir("/var/www/acme_web/static"))
fs := http.FileServer(http.Dir(filepath.Join(webDir, "static")))
http.Handle("/static/", http.StripPrefix("/static/", fs))
http.HandleFunc(puppetURL, triggerPuppet)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment