mirror of
https://github.com/Luzifer/twitch-manager.git
synced 2024-12-30 08:31:18 +00:00
Fix: Directory prefix not stripped
This commit is contained in:
parent
87ba88fc53
commit
1569df222e
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
@ -16,7 +16,7 @@ import (
|
|||
var (
|
||||
cfg = struct {
|
||||
AssetCheckInterval time.Duration `flag:"asset-check-interval" default:"1m" description:"How often to check asset files for updates"`
|
||||
AssetDir string `flag:"asset-dir" default:"." description:"Directory containing assets"`
|
||||
AssetDir string `flag:"asset-dir" default:"./public" description:"Directory containing assets"`
|
||||
BaseURL string `flag:"base-url" default:"" description:"Base URL of this service" validate:"nonzero"`
|
||||
ForceSyncInterval time.Duration `flag:"force-sync-interval" default:"1m" description:"How often to force a sync without updates"`
|
||||
Listen string `flag:"listen" default:":3000" description:"Port/IP to listen on"`
|
||||
|
@ -65,7 +65,7 @@ func main() {
|
|||
}
|
||||
|
||||
var (
|
||||
assetServer = http.FileServer(http.Dir(cfg.AssetDir))
|
||||
assetServer = http.StripPrefix("/public", http.FileServer(http.Dir(cfg.AssetDir)))
|
||||
router = mux.NewRouter()
|
||||
)
|
||||
registerAPI(router)
|
||||
|
|
Loading…
Reference in a new issue