Compare commits
2 Commits
3711c5402a
...
bce901e2a4
Author | SHA1 | Date | |
---|---|---|---|
bce901e2a4 | |||
e56cddb325 |
@ -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,
|
||||
|
@ -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,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user