fix: 修复assets文件路径拼接错误
- Gin的*filepath参数包含开头的/,需要去除 - 修复路径拼接导致的双斜杠问题 - 移除自动刷新逻辑,这不是正确的解决方案
This commit is contained in:
@@ -264,6 +264,7 @@ func setupEmbeddedFrontend(r *gin.Engine) {
|
||||
|
||||
r.GET("/assets/*filepath", func(c *gin.Context) {
|
||||
filepath := c.Param("filepath")
|
||||
filepath = strings.TrimPrefix(filepath, "/")
|
||||
decodedPath, err := url.PathUnescape(filepath)
|
||||
if err != nil {
|
||||
decodedPath = filepath
|
||||
|
||||
Reference in New Issue
Block a user