This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"log"
|
"log"
|
||||||
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
"net/url"
|
"net/url"
|
||||||
@@ -29,6 +30,14 @@ var (
|
|||||||
basicPass = os.Getenv("BASIC_AUTH_PASS")
|
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 {
|
func env(k, def string) string {
|
||||||
if v := os.Getenv(k); v != "" {
|
if v := os.Getenv(k); v != "" {
|
||||||
return v
|
return v
|
||||||
|
|||||||
Reference in New Issue
Block a user