gofiber / contrib

🧬 Repository for third party middlewares with dependencies
https://docs.gofiber.io/contrib/
MIT License
198 stars 102 forks source link

🚀 [Feature]: contrib/swagger.go exposes internal adresses. There should be a possibility to self-host #1124

Open knollet opened 1 month ago

knollet commented 1 month ago

Feature Description

Self host swagger to be able to use this even without internet access and to not expose internal addresses.

contrib/swagger defines a struct Config, which could include an optional field for an address where swagger is hosted.

Currently external default addresses (unpkg.com) are hardcoded here: https://github.com/go-openapi/runtime/blob/master/middleware/swaggerui.go There's an optional SwaggerUIOpts.Template parameter which is not settable through contrib/swagger.

It would be a plus to have an example as to how clone swagger into my project and how to configure fiber to use that.

Additional Context (optional)

No response

Code Snippet (optional)

No response

Checklist: