Skip to content

Commit

Permalink
@uppy/companion-client: treat * the same as missing header (#4221)
Browse files Browse the repository at this point in the history
Setting `Access-Control-Allow-Headers: *` should be interpreted as
when that header is missing, for backward compat.
  • Loading branch information
aduh95 authored Nov 16, 2022
1 parent b138e91 commit 92a0b20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@uppy/companion-client/src/RequestClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class RequestClient {
const response = await fetch(this.#getUrl(path), { method: 'OPTIONS' })

const header = response.headers.get('access-control-allow-headers')
if (header == null) {
if (header == null || header === '*') {
allowedHeadersCache.set(this.hostname, fallbackAllowedHeaders)
return fallbackAllowedHeaders
}
Expand Down

0 comments on commit 92a0b20

Please sign in to comment.