mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-25 10:01:46 +00:00
Setup swagger and swagger UI properly
This commit is contained in:
4
app.go
4
app.go
@@ -381,8 +381,8 @@ func (h *Headscale) Serve() error {
|
||||
r.POST("/machine/:id", h.RegistrationHandler)
|
||||
r.GET("/apple", h.AppleMobileConfig)
|
||||
r.GET("/apple/:platform", h.ApplePlatformConfig)
|
||||
|
||||
r.StaticFile("/swagger/swagger.json", "gen/openapiv2/v1/headscale.swagger.json")
|
||||
r.GET("/swagger", SwaggerUI)
|
||||
r.GET("/swagger/v1/openapiv2.json", SwaggerAPIv1)
|
||||
|
||||
api := r.Group("/api")
|
||||
api.Use(h.httpAuthenticationMiddleware)
|
||||
|
Reference in New Issue
Block a user