about summary refs log tree commit diff stats
path: root/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server.go')
-rw-r--r--server.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/server.go b/server.go
index 0835d68..935cc1e 100644
--- a/server.go
+++ b/server.go
@@ -1,7 +1,6 @@
 package main
 
 import (
-	"embed"
 	"errors"
 	"fmt"
 	"io"
@@ -45,9 +44,6 @@ type Host struct {
 	Fiber *fiber.App
 }
 
-//go:embed all:public/*
-var fs embed.FS
-
 var Commit string
 
 func main() {
@@ -130,10 +126,10 @@ func main() {
 
 	website.Use(recover.New(recover.Config{}))
 
-	files := http.FS(fs)
+	files := http.Dir("public")
 	notFoundHandler := func(c *fiber.Ctx) error {
 		c.Status(fiber.StatusNotFound).Type("html", "utf-8")
-		content, err := files.Open("public/404.html")
+		content, err := files.Open("404.html")
 		if err != nil {
 			c.Type("txt")
 			return c.SendString("404 Not Found")
@@ -143,7 +139,6 @@ func main() {
 	website.Get("/404.html", notFoundHandler)
 	website.Use("/", filesystem.New(filesystem.Config{
 		Root:               files,
-		PathPrefix:         "public",
 		ContentTypeCharset: "utf-8",
 		MaxAge:             int((24 * time.Hour).Seconds()),
 	}))