mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-17 21:37:35 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
25 lines
442 B
Go
25 lines
442 B
Go
package openapi
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/rakyll/statik/fs"
|
|
"github.com/rs/cors"
|
|
|
|
_ "github.com/zitadel/zitadel/openapi/statik"
|
|
)
|
|
|
|
const (
|
|
HandlerPrefix = "/openapi/v2/swagger"
|
|
)
|
|
|
|
func Start() (http.Handler, error) {
|
|
statikFS, err := fs.NewWithNamespace("swagger")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
handler := &http.ServeMux{}
|
|
handler.Handle("/", cors.AllowAll().Handler(http.FileServer(statikFS)))
|
|
return handler, nil
|
|
}
|