ember-deploy-s3-index icon indicating copy to clipboard operation
ember-deploy-s3-index copied to clipboard

Readme: 404 in redirect XML should be 403?

Open johnnyshields opened this issue 9 years ago • 4 comments

@Kerry350 great plugin!

One thing, in your redirect XML in the Readme you redirect from a 404 error, for me I found I have to use 403. Any thoughts on this?

<RoutingRules>
    <RoutingRule>
        <Condition>
            <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
        </Condition>
        <Redirect>
            <HostName><your-bucket-endpoint-from-static-website-hosting-options></HostName>
            <ReplaceKeyPrefixWith>#/</ReplaceKeyPrefixWith>
        </Redirect>
    </RoutingRule>
</RoutingRules>

johnnyshields avatar May 09 '15 13:05 johnnyshields

I've found the same issue (and when I deploy it seems to be over-writing with 404).

Truffula avatar Aug 31 '15 01:08 Truffula

If anybody needs it, I forked the package. It adds support for redirecting 403 (in addition to 404): https://github.com/ksol/ember-deploy-s3-index/blob/403-hotfix/lib/s3-adapter.js

ksol avatar Oct 06 '15 10:10 ksol

@ksol can you make a pull request for that? I think that would be good to have in here.

Truffula avatar Nov 11 '15 23:11 Truffula

@Truffula I could. However, ember-deploy 0.5 has been released with an "official" addon for s3-index that does not try to setup the policy, so if you set it right in the AWS console, you'll be ok for subsequent deploys. migrating from 0.4 to 0.5 should not take very long :)

ksol avatar Nov 12 '15 08:11 ksol