mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-31 02:34:07 +09:00
Setup swagger and swagger UI properly
This commit is contained in:
1 parent
2b340e8fa4
commit
482a31b66b
2 files changed
+67
-2
No files matched your search
@@ -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