Compare commits

...

2 Commits

Author SHA1 Message Date
lzh
bce901e2a4 1 2025-10-17 15:32:57 +08:00
lzh
e56cddb325 1 2025-10-17 15:32:55 +08:00
2 changed files with 2 additions and 2 deletions

View File

@ -197,7 +197,7 @@ func NewRouter() *gin.Engine {
importRoute.POST("data/confirm", imports.WorkConfirm)
}
//静态文件
r.StaticFS("/api/static", http.Dir("./runtime"))
r.StaticFS("/api/fiee/static", http.Dir("./runtime"))
r.NoRoute(func(c *gin.Context) {
c.JSON(http.StatusNotFound, gin.H{
"status": 1,

View File

@ -290,7 +290,7 @@ func BundleExport(ctx *gin.Context) {
service.Error(ctx, err)
return
}
var exportUrl string = fmt.Sprintf("/static/%s", strings.Replace(filePath, "./runtime/", "", 1))
var exportUrl string = fmt.Sprintf("%s:%s/api/fiee/static/%s",ctx.Request.URL.Scheme, ctx.Request.Host,strings.Replace(filePath, "./runtime/", "", 1))
service.Success(ctx, gin.H{
"url": exportUrl,
})