feat: update mime log
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user