CORS failure with custom host (Reason: expected ‘true’ in CORS header ‘Access-Control-Allow-Credentials’)

Created on 10 July 2022, over 2 years ago
Updated 10 December 2024, 2 months ago

Problem/Motivation

Upon attempting to upload files to an s3 bucket with a custom host, I receive this error:

expected ‘true’ in CORS header ‘Access-Control-Allow-Credentials’

Steps to reproduce

  1. install s3fs and s3fs_cors modules
  2. configure to connect to custom linode or digital ocean hosted s3 bucket
  3. validate configuration through the ui (successfully)
  4. attempt to upload a media entity
  5. receive the above mentioned message in the browser console as the reason for CORS failure

Proposed resolution

Remove withCredentials: true from the ajax request

Doing so for DigitalOcean and Linode S3 endpoints fixes the issue, as neither of these providers return Access-Control-Allow-Credentials in OPTIONS response headers.

Remaining tasks

  • Review patch to make sure it does not have any unanticipated consequences
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States MegaKeegMan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024