token-validator: add dev tag to not embedded static files into binary
This commit is contained in:
parent
2f162ac6df
commit
a0d4b431bc
3 changed files with 106 additions and 3 deletions
|
|
@ -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 != "/" {
|
||||
|
|
|
|||
Reference in a new issue