You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the configuration mentioned in the documentation above
allowed-origins、allowed-methods field in org.apache.dubbo.config.nested.CorsConfig Which are java type of String[] do not take effect, so the dubbo service can not get the corresponding CorsConfig value. But allow-credentials、max-age can take effect。
I reviewed the code of org.apache.dubbo.config.AbstractConfig(the red rectangle),none of condition can match. So no value will return when class field type is String[] .
Even fix problem above, I think it is not work. Http1UnaryServerChannelObserver rebuild the metadata(Header),so whatever the header is set in Filter, are not send to client.
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Yes I am willing to submit a pull request on my own!
Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo Java 3.3.0, OpenJDK17 , Windows 10
Steps to reproduce this issue
https://cn.dubbo.apache.org/zh-cn/overview/mannual/java-sdk/reference-manual/protocol/tripe-rest-manual/#cors%E9%85%8D%E7%BD%AE-2
According to the configuration mentioned in the documentation above
allowed-origins、allowed-methods field in org.apache.dubbo.config.nested.CorsConfig Which are java type of String[] do not take effect, so the dubbo service can not get the corresponding CorsConfig value. But allow-credentials、max-age can take effect。
I reviewed the code of org.apache.dubbo.config.AbstractConfig(the red rectangle),none of condition can match. So no value will return when class field type is String[] .
Even fix problem above, I think it is not work. Http1UnaryServerChannelObserver rebuild the metadata(Header),so whatever the header is set in Filter, are not send to client.
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
The text was updated successfully, but these errors were encountered: