Minio 403 Forbidden HEAD request using saveas (FileSaver.js)

517 Views Asked by At

I try download file using FileSaver.js (saveAs(minio-prefetch-url,'file.pdf')) but request HEAD is send and minio response with 403:

Status Code: 403 Forbidden
Referrer Policy: strict-origin-when-cross-origin
Server: MinIO
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Accept-Encoding
Vary: Origin
X-Amz-Id-2: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8
X-Amz-Request-Id: 1790AD52C0D34F55
X-Content-Type-Options: nosniff
X-Minio-Error-Code: SignatureDoesNotMatch
X-Minio-Error-Desc: "The request signature we calculated does not match the signature you provided. Check your key and signing method."
X-Xss-Protection: 1; mode=block

after failiure link is opened in new tab and the content (pdf) is shown. So Signature in url is valid.

I am using latest minio image: quay.io/minio/minio:RELEASE.2023-10-16T04-13-43Z and traefik: traefik:v2.10

My app (GUI) is deployed on app.example.com and minio is deployed on minio.example.com. I also configure API cors via minio console:

enter image description here

Does anyone have similar problems? How to solve this?

1

There are 1 best solutions below

2
On

Did you use a CDN like Cloudflare for your Minio domain? If so, try disabling the cache for the Minio domain in the CDN.