documentation/content
Thomas Soubrier 46cbbc6d73
Update object-storage-proxy.md (#1056)
This documentation has I believe one very confusing point: It uses two times `YOUR_S3_HOSTNAME` in the nginx configuration example, however the second time it looks like you actually have to use `YOUR_BUCKET_NAME.YOUR_S3_HOSTNAME`.

## Explanation
Mastodon is using path-style requests to S3 which looks like this:
https://s3.region-code.amazonaws.com/bucket-name/key-name

Once you enable the new virtual host nginx file using the current indications, the path-style request which goes to amazon looks like this:
https://s3.region-code.amazonaws.com/key-name

In other words, the bucket name is not being sent S3 and the images break.

This is because the current instructions make it seem like the header Host name is not including the bucket
`proxy_set_header Host YOUR_S3_HOSTNAME;`

With the current path-style request integration, one must use the bucket name in the Host header for this to work, hence the proposed change to

`proxy_set_header Host YOUR_BUCKET_NAME.YOUR_S3_HOSTNAME;`
2023-03-29 10:52:31 +02:00
..
en Update object-storage-proxy.md (#1056) 2023-03-29 10:52:31 +02:00
ja Switch hosting to Vercel (#1113) 2022-12-21 06:26:37 +01:00
pl Switch hosting to Vercel (#1113) 2022-12-21 06:26:37 +01:00
zh-cn Correct links to the main mastodon repo (master --> main) (#1173) 2023-03-08 17:40:02 +01:00