ember-cli-deploy/ember-cli-deploy-s3-index

`Without Cloudfront` solution is invalid

adamreisnz opened this issue · 7 comments

Just thought I'd mention that the suggestion as reported here in the readme https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index#without-cloudfront to use redirect rules with a hash in the URL will not work in Safari.

I would therefore recommend not advising it as an option, or at least mention that this approach will not work in Safari. Safari will simply redirect to the home/landing page.

Thanks for raising this issue. The discussion you linked seems to state this is a bug and should have been fixed in ios 9. Do you have a url available where you can reproduce this behaviour?

@LevelbossMike you can try for example this page:

https://staging.jolinejolink.com/shop/kleding/alle/

It's an SPA with the static files currently hosted on S3 with the redirect rules applied to it, so the URL gets rewritten to https://staging.jolinejolink.com/#/shop/kleding/alle/

This works fine in Chrome, but in Safari I get redirected to https://staging.jolinejolink.com/

(Safari 9.1.1 @ OS X 10.11.5)

@LevelbossMike it could be related to this issue https://bugs.webkit.org/show_bug.cgi?id=158420

Since the S3 bucket is sitting behind CloudFlare CDN, there might be multiple redirects present.

Thx for the URL. I can confirm this is a problem on Safari on 10.11.6 but works on iOS 10.

We should most likely put a note about this bug into the README and also tell people that changing the error response via Cloudfront or similiar is actually the way to go. Do you want to create a PR for that @adambuczynski?

@LevelbossMike I actually tested on iOS 10.0.2 and found it not working either. Which exact version did you use?

Sorry, as I don't use ember-cli-deploy myself, I don't have the spare time to create a PR. A colleague pointed me to the readme as I was analysing the 404 problem for an Angular app, but I figured I'd give you a heads up anyway!

I'm on 10.0.1 Thanks for the heads up! I'll update the README accordingly.

@LevelbossMike looks like this never made it to the README?
It's still coming up in google searches to this day.
I submitted a PR if that helps.