45d165749f
Move MinIO from minio.localhost to minio.fizzy.localhost, which makes it same-site with the app, so the CORS redirect succeeds. The service worker fetches Active Storage URLs with `mode: "cors"` so it can inspect response sizes for offline caching. Active Storage's redirect controller returns a 302 to the MinIO presigned URL. When that redirect crosses site boundaries (from fizzy.localhost to minio.localhost), the browser sets the Origin header to "null" on the redirected request per the Fetch spec, which fails the CORS check and produces net::ERR_FAILED.
30 lines
1.2 KiB
YAML
30 lines
1.2 KiB
YAML
test:
|
|
service: Disk
|
|
root: <%= Rails.root.join("tmp/storage/files") %>
|
|
|
|
local:
|
|
service: Disk
|
|
root: <%= Rails.root.join("storage", Rails.env, "files") %>
|
|
|
|
devminio:
|
|
service: S3
|
|
bucket: fizzy-dev-activestorage
|
|
endpoint: "http://minio.fizzy.localhost:39000"
|
|
force_path_style: true
|
|
request_checksum_calculation: when_required # default is when_supported with CRC64NVME checksum which FlashBlade doesn't support
|
|
response_checksum_validation: when_required # default is when_supported with CRC64NVME checksum which FlashBlade doesn't support
|
|
region: us-east-1 # default region required for signer
|
|
access_key_id: minioadmin
|
|
secret_access_key: minioadmin
|
|
|
|
s3:
|
|
service: S3
|
|
access_key_id: <%= ENV["S3_ACCESS_KEY_ID"] %>
|
|
bucket: <%= ENV["S3_BUCKET"] || "fizzy-#{Rails.env}-activestorage" %>
|
|
endpoint: <%= ENV["S3_ENDPOINT"] %>
|
|
force_path_style: <%= ENV["S3_FORCE_PATH_STYLE"] == "true" %>
|
|
region: <%= ENV.fetch("S3_REGION", "us-east-1") %>
|
|
request_checksum_calculation: <%= ENV.fetch("S3_REQUEST_CHECKSUM_CALCULATION", "when_supported") %>
|
|
response_checksum_validation: <%= ENV.fetch("S3_RESPONSE_CHECKSUM_VALIDATION", "when_supported") %>
|
|
secret_access_key: <%= ENV["S3_SECRET_ACCESS_KEY"] %>
|