This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"log"
|
||||
"mime"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
@@ -29,6 +30,14 @@ var (
|
||||
basicPass = os.Getenv("BASIC_AUTH_PASS")
|
||||
)
|
||||
|
||||
func init() {
|
||||
_ = mime.AddExtensionType(".css", "text/css")
|
||||
_ = mime.AddExtensionType(".js", "application/javascript")
|
||||
_ = mime.AddExtensionType(".mjs", "application/javascript")
|
||||
_ = mime.AddExtensionType(".woff2", "font/woff2")
|
||||
_ = mime.AddExtensionType(".woff", "font/woff")
|
||||
}
|
||||
|
||||
func env(k, def string) string {
|
||||
if v := os.Getenv(k); v != "" {
|
||||
return v
|
||||
|
||||
Reference in New Issue
Block a user