fixup cors handling

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-03-20 12:27:14 +03:00
parent 542d4cec00
commit db423dff58
2 changed files with 22 additions and 18 deletions

View File

@@ -136,8 +136,8 @@ func RegisterRPCHandler(b bool) server.Option {
type registerCORSHandlerKey struct{}
// RegisterCORSHandler registers cors endpoints with /ServiceName.ServiceEndpoint method POPTIONSOST
func RegisterCORSHandler(b bool) server.Option {
return server.SetOption(registerCORSHandlerKey{}, b)
func RegisterCORSHandler(b bool) server.HandlerOption {
return server.SetHandlerOption(registerCORSHandlerKey{}, b)
}
type handlerEndpointsKey struct{}