-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
since f251eea service static files are not working as expected.
package main
import "github.com/labstack/echo"
func main() {
// Echo instance
e := echo.New()
// Routes
e.Static("/apidocs/", "./api/current/")
e.Get("/:machineid", func(c *echo.Context) error { return c.NoContent(200) })
e.Get("/:machineid/:count", func(c *echo.Context) error { return c.NoContent(200) })
// Start server
e.Run(":8080")
}
my /api/current is a folder which contains swagger stuff. The code above works fine if I comment out the second Get route.
e.Static("/apidocs/", "./api/current/")
e.Get("/:machineid", func(c *echo.Context) error { return c.NoContent(200) })
// e.Get("/:machineid/:count", func(c *echo.Context) error { return c.NoContent(200) })
A get on /apidocs/ returns the same html content for each request:
localhost:8080/apidocs
localhost:8080/apidocs/swagger-ui.js -> returns the content of index.html