-
Notifications
You must be signed in to change notification settings - Fork 373
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]: Custom request headers cannot be set in BFF mode. #6582
Comments
I think this has nothing to do with EdenX, it's the cross domain policy, maybe you need Access-Control-Allow-Headers |
I'm sure it's due to modern not being able to pass origin. If you look closely at the code, the cors configuration can't be passed correctly, otherwise there is no explanation for cors not working. I tried configuring the header to be |
To add further, server is running in modernjs BFF mode. The problem I'm having is that in Modernjs BFF mode, cors is configured, but it's not working. Wait a few minutes and I'll upload an example. |
This is caused by a dev middleware of rsbuild that Modern.js depends on, which has been fixed in the latest version. Please use |
Version
Details
use http client, visit
http://127.0.0.1:8080/index.html
:server, run
http://127.0.0.1:8081/api/hello
, on modernjs BFF mode:/api/hello
:If I remove the headers field, the cross-domain works, but with it, it doesn't.
Reproduce link
https://modernjs.dev/guides/advanced-features/bff/sdk.html
Reproduce Steps
see detail section.
The text was updated successfully, but these errors were encountered: