π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
separate bucket-cors troubleshooting guide
mngshm60f11720336b
diff --git a/docs/docs/.vitepress/sidebar.ts b/docs/docs/.vitepress/sidebar.tsindex 2a30266671..6e78fb7384 100644--- a/docs/docs/.vitepress/sidebar.ts+++ b/docs/docs/.vitepress/sidebar.ts@@ -253,10 +253,6 @@ export const sidebar = [text: "Hosting Ente from source",link: "/self-hosting/guides/from-source",},- {- text: "DB migration",- link: "/self-hosting/guides/db-migration",- },{text: "Hosting Ente without Docker",link: "/self-hosting/guides/standalone-ente",@@ -265,15 +261,18 @@ export const sidebar = [text: "Ente via Tailscale (Community)",link: "/self-hosting/guides/Tailscale.md",},+ {+ text: "Administering your server",+ link: "/self-hosting/guides/admin",+ },{text: "Configure CLI for Self Hosted Instance",link: "/self-hosting/guides/selfhost-cli",},{- text: "Administering your server",- link: "/self-hosting/guides/admin",+ text: "DB migration",+ link: "/self-hosting/guides/db-migration",},-{text: "Mobile build",link: "/self-hosting/guides/mobile-build",@@ -305,6 +304,10 @@ export const sidebar = [text: "General",link: "/self-hosting/troubleshooting/misc",},+ {+ text: "Bucket CORS",+ link: '/self-hosting/troubleshooting/bucket-cors'+ },{text: "Uploads",link: "/self-hosting/troubleshooting/uploads",diff --git a/docs/docs/self-hosting/troubleshooting/bucket-cors.md b/docs/docs/self-hosting/troubleshooting/bucket-cors.mdnew file mode 100644index 0000000000..19c1dbff47--- /dev/null+++ b/docs/docs/self-hosting/troubleshooting/bucket-cors.md@@ -0,0 +1,62 @@+---+title: Bucket CORS+description: Troubleshooting CORS issues with S3 Buckets+---++# Fix potential CORS issues with your Buckets++## For AWS S3++If you cannot upload a photo due to a CORS issue, you need to fix the CORS+configuration of your bucket.++Create a `cors.json` file with the following content:++```json+{+ "CORSRules": [+ {+ "AllowedOrigins": ["*"],+ "AllowedHeaders": ["*"],+ "AllowedMethods": ["GET", "HEAD", "POST", "PUT", "DELETE"],+ "MaxAgeSeconds": 3000,+ "ExposeHeaders": ["Etag"]+ }+ ]+}+```++You may want to change the `AllowedOrigins` to a more restrictive value.++If you are using AWS for S3, you can execute the below command to get rid of+CORS. Make sure to enter the right path for the `cors.json` file.++```bash+aws s3api put-bucket-cors --bucket YOUR_S3_BUCKET --cors-configuration /path/to/cors.json+```++## For Self-hosted Minio Instance++> Important: MinIO does not take JSON CORS file as the input, instead you will+> have to build a CORS.xml file or just convert the above `cors.json` to XML.++A minor requirement here is the tool `mc` for managing buckets via command line+interface. Checkout the `mc set alias` document to configure alias for your+instance and bucket. After this you will be prompted for your AccessKey and+Secret, which is your username and password, go ahead and enter that.++```sh+mc cors set <your-minio>/<your-bucket-name /path/to/cors.xml+```++or, if you just want to just set the `AllowedOrigins` Header, you can use the+following command to do so.++```sh+mc admin config set <your-minio>/<your-bucket-name> api cors_allow_origin="*"+```++You can create also `.csv` file and dump the list of origins you would like to+allow and replace the `*` with `path` to the CSV file.++Now, uploads should be working fine.\ No newline at end of file