linstrom/server/frontend.go
mstar b9eb4234f4 Fix passkey authentication
Also prep for better router layout
2024-10-15 16:16:18 +02:00

14 lines
315 B
Go

package server
import (
"io/fs"
"net/http"
)
func setupFrontendRouter(interactiveFs, noscriptFs fs.FS) http.Handler {
router := http.NewServeMux()
router.Handle("/noscript/", http.StripPrefix("/noscript", http.FileServerFS(noscriptFs)))
router.Handle("/", http.FileServerFS(interactiveFs))
return router
}