Does Amazon S3 need time to update CORS settings? How long?

后端 未结 4 1128
余生分开走
余生分开走 2021-01-02 02:12

Recently I enabled Amazon S3 + CloudFront to serve as CDN for my rails application. In order to use font assets and display them in Firefox or IE, I have to enable CORS on m

4条回答
  •  甜味超标
    2021-01-02 02:32

    You have a few problems with the way you test CORS.

    1. Your CORS configuration does not have a HEAD method.
    2. Your curl command does not have -H header.

    I am able to get your data by using curl like following. However they dumped garbage on my screen because your data is compressed binary.

    curl --request GET  https://small-read-staging-assets.s3.amazonaws.com/staging/assets/settings_settings-312b7230872a71a534812e770ec299bb.js.gz -H "http://google.com"
    

提交回复
热议问题