1
0
mirror of https://github.com/zitadel/zitadel.git synced 2025-03-26 12:30:55 +00:00

22 lines
339 B
Go
Raw Normal View History

package openapi
import (
"embed"
"net/http"
"github.com/rs/cors"
)
const (
HandlerPrefix = "/openapi/v2/swagger"
)
//go:embed v2/zitadel/*
var openapi embed.FS
func Start() (http.Handler, error) {
handler := &http.ServeMux{}
handler.Handle("/", cors.AllowAll().Handler(http.FileServer(http.FS(openapi))))
return handler, nil
}