mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Fixed folders for static
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"path"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -56,7 +57,7 @@ func everythingElse(c *gin.Context) {
|
||||
}
|
||||
|
||||
func serveStaticFile(c *gin.Context, option string) {
|
||||
staticFile, err := ioutil.ReadFile("./static" + option)
|
||||
staticFile, err := ioutil.ReadFile(path.Join(RuntimeArgs.SourcePath, "static") + option)
|
||||
if err != nil {
|
||||
c.AbortWithStatus(404)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user