ember-deploy-s3-index
ember-deploy-s3-index copied to clipboard
Readme: 404 in redirect XML should be 403?
@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>
I've found the same issue (and when I deploy it seems to be over-writing with 404
).
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 can you make a pull request for that? I think that would be good to have in here.
@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 :)