mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:37:31 +00:00
22 lines
339 B
Go
22 lines
339 B
Go
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
|
|
}
|