Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Refused to get unsafe header "tus-version" #462

Closed
PVince81 opened this issue Apr 24, 2020 · 3 comments · Fixed by #463
Closed

Refused to get unsafe header "tus-version" #462

PVince81 opened this issue Apr 24, 2020 · 3 comments · Fixed by #463
Assignees

Comments

@PVince81
Copy link

Since the addition of TUS we are now checking the TUS capability from the backend by reading the "tus-version" header.

If that one is not available, we should fail silently.

When using OC 10 as backend we get the error Refused to get unsafe header "tus-version" because it's not part of CORS.

I suggest we add a try/catch block in the SDK when parsing responses

@PVince81 PVince81 self-assigned this Apr 24, 2020
@PVince81
Copy link
Author

Attempt 1: trying try/catch around the get call => 💥

Attempt 2: trying to read the list of exposed headers before getting the unsafe header:
image

🤯

@PVince81
Copy link
Author

Attempt 3: using getAllResponseHeaders to check beforehand whether the tus header is there without tripping over that error

@PVince81
Copy link
Author

attempt 3 successful, PR here: #463

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant