From 876caea3c26e1f029d7ee6a7dd271e1a555dfa79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20G=C3=96R=C3=96G?= Date: Mon, 1 Apr 2024 13:38:33 +0200 Subject: [PATCH] chore: include CORS related config in the readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 5d38f3b..70bc93f 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,25 @@ uppy.addPreProcessor(() => { }) ``` +Configure the CORS of your S3 or S3-compatible solution. It needs to allow GET and PUT requests from your domain and expose some unsafe HTTP headers to Uppy. Example: + +```json +[ + { + "AllowedOrigins": ["https://my-app.com"], + "AllowedMethods": ["GET", "PUT"], + "MaxAgeSeconds": 3000, + "AllowedHeaders": [ + "Authorization", + "x-amz-date", + "x-amz-content-sha256", + "content-type" + ], + "ExposeHeaders": ["ETag", "Location"] + } +] +``` + ## Defaults The expiration times for the signe links is `15 minutes`.