Skip to content

CORS error while cropping with private S3 #469

Description

@ElenaLeau

I have a Laravel project with a private S3 bucket and I am using temporaryURLs to get the images into my Laravel Nova.

I have a CORS problem when I try to crop an image with a temporaryURL. I made it work on Firefox when I updated the CORSConfiguration for my bucket with the following CORSRules:

'AllowedOrigins' => [config(app_url)]             // no *, since this is about a private bucket
'AllowedMethods' => ['GET', 'POST', 'PUT'],
'AllowedHeaders' => ['*'],
'ExposeHeaders' => ['ETag'],

I still get the following error on Chromium based Browsers:
Access to XMLHttpRequest at { img_url } from origin { app_url } has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to image at { img_url } from origin { app_url } has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there a way to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions