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

changed html file names

parent 9310dd48
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,6 @@ import ( ...@@ -8,7 +8,6 @@ import (
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"strings" "strings"
"time"
"github.com/docopt/docopt-go" "github.com/docopt/docopt-go"
) )
...@@ -45,13 +44,12 @@ func renderPage(w http.ResponseWriter, req *http.Request) { ...@@ -45,13 +44,12 @@ func renderPage(w http.ResponseWriter, req *http.Request) {
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
} }
fmt.Printf("test %s\n", serveFile) fmt.Printf("test %s\n", serveFile)
time.Sleep(1 * time.Second)
http.ServeFile(w, req, serveFile) http.ServeFile(w, req, serveFile)
} }
// function redirect // function redirect
func redirect(w http.ResponseWriter, r *http.Request) { func redirect(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/index.html", http.StatusMovedPermanently) http.Redirect(w, r, "/sorted_by_name.html", http.StatusMovedPermanently)
} }
func main() { func main() {
...@@ -89,11 +87,11 @@ Options: ...@@ -89,11 +87,11 @@ Options:
listenPort := arguments["--listen-port"].(string) listenPort := arguments["--listen-port"].(string)
baseURLs := [6]string{"/sectigo_ev", "/sectigo_ov", "/letsencrypt", "/sectigo_ev/", "/sectigo_ov/", "/letsencrypt/"} baseURLs := [6]string{"/sectigo_ev", "/sectigo_ov", "/letsencrypt", "/sectigo_ev/", "/sectigo_ov/", "/letsencrypt/"}
otherURLs := [12]string{"/letsencrypt/cert_mame.html", "/letsencrypt/expiry_date.html", otherURLs := [12]string{"/letsencrypt/sorted_by_name.html", "/letsencrypt/sorted_by_expiration.html",
"/letsencrypt/letsencrypt.json", "/letsencrypt/letsencrypt_expired.json", "/letsencrypt/letsencrypt.json", "/letsencrypt/letsencrypt_expired.json",
"/sectigo_ov/cert_mame.html", "/sectigo_ov/expiry_date.html", "/sectigo_ov/sorted_by_name.html", "/sectigo_ov/sorted_by_expiration.html",
"/sectigo_ov/sectigo_ov.json", "/sectigo_ov/sectigo_ov_expired.json", "/sectigo_ov/sectigo_ov.json", "/sectigo_ov/sectigo_ov_expired.json",
"/sectigo_ev/incert_mamedex.html", "/sectigo_ev/expiry_date.html", "/sectigo_ev/sorted_by_name.html", "/sectigo_ev/sorted_by_expiration.html",
"/sectigo_ev/sectigo_ev.json", "/sectigo_ev/sectigo_ev_expired.json"} "/sectigo_ev/sectigo_ev.json", "/sectigo_ev/sectigo_ev_expired.json"}
fs := http.FileServer(http.Dir("/var/www/acme_web/static")) fs := http.FileServer(http.Dir("/var/www/acme_web/static"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment