Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ func LoadConfig() (*Config, error) {

cfg.configPath = configPath

// If static path is blank in config, try to read from environment variable
if cfg.StaticPath == "" {
cfg.StaticPath = os.Getenv("STATIC_PATH")
}

// Hash password for validation
if cfg.Password != "" {
// Check if password is already hashed
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ func main() {
fs := http.FileServer(http.Dir(cfg.StaticPath))
router.PathPrefix("/").Handler(fs)
}
} else {
log.Println("Info: Static path not configured, static file serving disabled")
}

// Create HTTP server
Expand Down