token-validator: add dev tag to not embedded static files into binary

This commit is contained in:
nemunaire 2020-02-27 15:07:27 +01:00
commit a0d4b431bc
3 changed files with 106 additions and 3 deletions

View file

@ -6,12 +6,10 @@ import (
"net/http"
"net/url"
"path"
"path/filepath"
"strings"
)
var sharedSecret string
var StaticDir string
type ResponseWriterPrefix struct {
real http.ResponseWriter
@ -66,7 +64,7 @@ func main() {
// Sanitize options
var err error
log.Println("Checking paths...")
if StaticDir, err = filepath.Abs(StaticDir); err != nil {
if err = sanitizeStaticOptions(); err != nil {
log.Fatal(err)
}
if *baseURL != "/" {