diff --git a/backend/app/service/http/http.go b/backend/app/service/http/http.go index 2cc20bc..6e95739 100644 --- a/backend/app/service/http/http.go +++ b/backend/app/service/http/http.go @@ -118,11 +118,14 @@ func Serve(cmd *cobra.Command, args []string) error { ext := filepath.Ext(f) mime := mime.TypeByExtension(ext) - log.Infof("mime type: %s %s", ext, mime) + log.Infof("admin mime type: %s %s", ext, mime) ctx.Set(fiber.HeaderContentType, mime) + log.Infof("check file: %s", filepath.Join(svc.App.DistAdmin, f)) file, err := fabfile.Find(filepath.Join(svc.App.DistAdmin, f)) if err != nil { + + log.Infof("check file: %s", filepath.Join(svc.App.DistAdmin, "index.html")) file, err = fabfile.Find(filepath.Join(svc.App.DistAdmin, "index.html")) if err != nil { return ctx.SendStatus(fiber.StatusNotFound) @@ -137,11 +140,13 @@ func Serve(cmd *cobra.Command, args []string) error { } ext := filepath.Ext(f) mime := mime.TypeByExtension(ext) - log.Infof("mime type: %s %s", ext, mime) + log.Infof("front mime type: %s %s", ext, mime) ctx.Set(fiber.HeaderContentType, mime) + log.Infof("check file: %s", filepath.Join(svc.App.DistWeChat, f)) file, err := fabfile.Find(filepath.Join(svc.App.DistWeChat, f)) if err != nil { + log.Infof("check file: %s", filepath.Join(svc.App.DistWeChat, "index.html")) file, err = fabfile.Find(filepath.Join(svc.App.DistWeChat, "index.html")) if err != nil { return ctx.SendStatus(fiber.StatusNotFound)