Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] tripple-rest global CORS not support #14779

Closed
3 of 4 tasks
stdiogo opened this issue Oct 14, 2024 · 2 comments
Closed
3 of 4 tasks

[Bug] tripple-rest global CORS not support #14779

stdiogo opened this issue Oct 14, 2024 · 2 comments
Assignees
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@stdiogo
Copy link

stdiogo commented Oct 14, 2024

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar issues.

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

image
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[] .
image

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.
image

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!

Code of Conduct

@stdiogo stdiogo added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Oct 14, 2024
@stdiogo stdiogo changed the title [Bug] tripple-rest全局CORS不支持 [Bug] tripple-rest CORS not support Oct 14, 2024
@stdiogo stdiogo changed the title [Bug] tripple-rest CORS not support [Bug] tripple-rest global CORS not support Oct 14, 2024
@AlbumenJ
Copy link
Member

Please translate all the content to English

@stdiogo
Copy link
Author

stdiogo commented Oct 14, 2024

Please translate all the content to English

done

@oxsean oxsean self-assigned this Oct 14, 2024
oxsean added a commit to oxsean/dubbo that referenced this issue Oct 20, 2024
oxsean added a commit to oxsean/dubbo that referenced this issue Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage
Projects
Archived in project
Development

No branches or pull requests

3 participants