FIX static files
This commit is contained in:
parent
f17b8179b6
commit
bf0fd51252
2 changed files with 8 additions and 5 deletions
|
@ -1,18 +1,21 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/namsral/flag"
|
||||
|
||||
"git.lattuga.net/boyska/feedpanel/panelui"
|
||||
"github.com/urfave/negroni"
|
||||
)
|
||||
|
||||
func main() {
|
||||
allowedName := flag.String("allowed-name", "", "Name allowed to forward auth")
|
||||
addr := flag.String("listen-addr", ":8000", "Address to listen on")
|
||||
flag.Parse()
|
||||
fs := flag.NewFlagSetWithEnvPrefix(os.Args[0], "PANEL", 0)
|
||||
allowedName := fs.String("allowed-name", "", "Name allowed to forward auth")
|
||||
addr := fs.String("listen-addr", ":8000", "Address to listen on")
|
||||
fs.Parse(os.Args[1:])
|
||||
|
||||
var allowedNames []string
|
||||
if *allowedName != "" {
|
||||
|
|
|
@ -24,6 +24,6 @@ func GetMux() *http.ServeMux {
|
|||
templateExecute(w, r, "home.html", templates,
|
||||
map[string]interface{}{"User": user})
|
||||
})
|
||||
mux.Handle("/static", http.FileServer(static.HTTPBox()))
|
||||
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(static.HTTPBox())))
|
||||
return mux
|
||||
}
|
||||
|
|
Reference in a new issue