1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

エラー: Access to fetch at 'https://<バケット名>.s3.us-east-1.amazonaws.com/HQ6Y8btCPrvZ65jk.mp4?x-id=PutObject' from origin 'http://localhost:3000' has been blocked by CORS policy

Posted at

背景

s3の画像アップロード処理で、コンソールにCORSエラーが発生してた。
s3のバケットのCORS設定を見直してもダメ。

エラーメッセージ

Access to fetch at 'https://<バケット名>.s3.us-east-1.amazonaws.com/HQ6Y8btCPrvZ65jk.mp4?x-id=PutObject' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

原因

リージョンが間違ってました...

解決

リージョン変更したら普通にイケました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?