smallnest / rpcx

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!
https://rpcx.io
Other
8.11k stars 1.17k forks source link

cors.Options conversion failes #773

Closed bububa closed 1 year ago

bububa commented 1 year ago

../../../../pkg/mod/github.com/smallnest/rpcx@v1.7.15/server/gateway.go:67:23: cannot convert s.corsOptions (variable of type CORSOptions) to type cors.Options ../../../../pkg/mod/github.com/smallnest/rpcx@v1.7.15/server/jsonrpc2.go:232:23: cannot convert s.corsOptions (variable of type CORSOptions) to type cors.Options

smallnest commented 1 year ago

要使用rpcx go.mod中 cors版本 github.com/rs/cors v1.8.2

你检查一下你的go.mod cors 版本

bububa commented 1 year ago

这个实现可能有问题,cors 1.8.2到1.8.3小版本变更不应该引起breaking change.如果有第三方库用到高版本 cors 1.x.x都会导致编译失败

smallnest commented 1 year ago

这是cors的问题。 小版本的变化不应该break api。

不管怎样,rpcx可以升级cors的版本