You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /api/v1/example/helloworld --> main.Helloworld (3 handlers)
[GIN-debug] GET /swagger/*any --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (3 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Listening and serving HTTP on :8080
[GIN] 2022/08/04 - 12:43:51 | 200 | 149.986µs | 127.0.0.1 | GET "/swagger/index.html"
[GIN] 2022/08/04 - 12:43:51 | 404 | 14.294µs | 127.0.0.1 | GET "/swagger/swagger-ui-bundle.js"
[GIN] 2022/08/04 - 12:43:51 | 404 | 20.702µs | 127.0.0.1 | GET "/swagger/swagger-ui-standalone-preset.js"
[GIN] 2022/08/04 - 12:43:51 | 404 | 6.681µs | 127.0.0.1 | GET "/swagger/swagger-ui.css"
Maybe related: swaggo/http-swagger#10, don't know if the issue is in this codebase or in some dependency, but it's not working here as well.
The text was updated successfully, but these errors were encountered:
you can get in ginswagger.WrapHandler -> CustomWrapHandler
you can see once.Do(func() {
handler.Prefix = matches[1]
})
and handler.ServeHTTP(c.Writer, c.Request), that means when the first request url is where .js、.css in, so you have to use the same url as the first request url or replace /swagger/*any with a specific route
The CSS & JS files all respond with 404. Even using the example from the README.md I still get the same results.
gin-swagger/README.md
Lines 99 to 136 in b9e926c
Maybe related: swaggo/http-swagger#10, don't know if the issue is in this codebase or in some dependency, but it's not working here as well.
The text was updated successfully, but these errors were encountered: