Fixed base path (again again again) and rewrote .env
This commit is contained in:
@@ -40,7 +40,7 @@ func Article(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
ta := tmplArticle{
|
||||
Title: article.Title,
|
||||
BasePath: config.Protocol,
|
||||
BasePath: config.Address + config.Path,
|
||||
Summary: article.Summary,
|
||||
Image: article.Image,
|
||||
Authors: authors,
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func ServePath(w http.ResponseWriter, r *http.Request) {
|
||||
path := filepath.Join(config.FrontendDir, strings.TrimPrefix(r.URL.Path, config.Prefix))
|
||||
path := filepath.Join(config.FrontendDir, strings.TrimPrefix(r.URL.Path, config.Path))
|
||||
if _, err := os.Stat(path); os.IsNotExist(err) {
|
||||
Error404(w, r)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user