-
-
Notifications
You must be signed in to change notification settings - Fork 596
Refused to get unsafe header "access-control-expose-headers" on Chrome #2059
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
Comments
Thanks for opening this issue!
|
I have the same issue |
I have the same issue also, I've tried different CORS settings on server side but no luck. |
also getting it now |
This header was added in #2033. Maybe someone could investigate this to find out what's wrong with the header implementation. Added a bounty. |
Also I have the same error !!! I wait for the solution :) |
@mtrezza I experienced this as well, and with some digging I found a Stack Overflow explanation and a possible solution: 'access-control-expose-headers': 'Content-Encoding, X-Parse-Job-Status-Id, X-Parse-Push-Status-Id', MDN says that Would love to see this fixed, if someone could test this possible solution out that would be great :) |
Would you want to open a PR to fix this? We could then release an alpha version of the bug fix and others could easily test this out as the pre-release will be published on npm. We also would need a test to prevent a regression bug. |
According to this article (https://trackjs.com/blog/refused-unsafe-header/), this error is show in chrome/chromium on any attempt at accessing a header that isn't present. Changing
to:
This fixed it for me. it is worth noting it does seem to be just a console message and doesn't really hurt the execution. Previous version of the code did use |
Would you want to open a PR? |
🎉 This change has been released in version 5.1.0-alpha.5 |
🎉 This change has been released in version 5.1.0-beta.1 |
🎉 This change has been released in version 5.1.0 |
Can we also add this fix to sdk version 4.x.x ? |
Do we have updates on this to add this fix in Parse SDK version 4.x.x? Thanks |
@fordsteriote This issue is basically a warning, it wouldn’t crash your code. You should be good 👍 |
Thanks @dplewis |
@dplewis It's a pretty bothersome issue, it completely fills up the console in my case and I cannot upgrade to Parse JS SDK 5.x.x because of the incompatibility with Node 16... |
Hi! It seems several of us are stuck on Parse 4 and version 4.3.1 addresses some critical vulnerabilities. |
We do not have a long-term support policy for older versions of the Parse JS SDK, so there is no back-port planned for this fix. Even if we did have a LTS policy, we would likely only back-port security fixes, as we currently do in Parse Server where we do have a LTS policy. A workaround may be to create a fork and apply the fix yourself, and use that SDK. The fix itself seems to be simple. |
Hi @mtrezza , understood. Thank you very much for taking the time to explain this. |
New Issue Checklist
Issue Description
Latest Parse SDK (v4.3.1) from "localhost:4200" raise systematically a chrome error
Refused to get unsafe header "access-control-expose-headers"
when usingCloud.run(...)
against a Parse-Server also hosted on localhost.Issue does not exist with Parse SDK v4.3.0.
Steps to reproduce
Launch a Parse-Server (last version >= v6.4.0).
Use Chrome (or Brave) to make a call to Parse-Server, using the Parse SDK v4.3.1 with the Cloud.run(...) function.
Actual Outcome
Raise a Chrome error
Refused to get unsafe header "access-control-expose-headers"
for each call using Cloud.run(...)Expected Outcome
No error as v4.3.0
Environment
NodeJS >= 18
Server
v6.4.0
Windows 10
Local
Database
Postgres
15.x
Local
Client
4.3.1
The text was updated successfully, but these errors were encountered: