5 ms·
For #4, this is actually frustratingly difficult, but if your constraints are not adding to the complexity, your best bet is to not, and just set your cookies t
by abofh 4y ago
For #4, this is actually frustratingly difficult, but if your constraints are not adding to the complexity, your best bet is to not, and just set your cookies to the domain. But if you like, one approach that would work:
- Cert with SAN
- CNAME's on the CF distribution
- S3 Bucket
And the sneaky bit: Use a cloudfront lambda to redirect "wrong" Hosts - comes with a cost, but it's super marginal.
Otherwise, your best approach is sadly a second cloudfront distribution with a different bucket (or bucket path) that just hosts a redirecting index key because you end up fighting stupid AWS design decisions.
Not that I've ever wasted stupid amounts of time on this particular problem...
- aidos 4y agoThese days my solution is to put cloudflare in front of it and walk away. Good game to add to my current daily routine (heardle, Wordle, quordle, worldle), but man is it hard!
- 867-5309 4y agosurely the answer is just an HTTP redirect? thanks for heardle! have you tried nerdle?
- aidos 4y agoIf you’re statically hosting on s3 then that isn’t an option while also supporting tls. You need something in front. You can go the cloudfront route but last time I looked it was all a bit of a pain. Cloudflare takes minutes to set up and the whole thing will be done and maintenance free.
- 867-5309 4y agothanks for the info. I use letsencrypt and have never had to touch it since setup, cloudflare must work in a similar way but handling DNS aswell
- thaumasiotes 4y ago> thanks for heardle! have you tried nerdle? https://www.samandfuzzy.com/3138 https://www.samandfuzzy.com/3138
- Jarwain 4y ago> For #4, this is actually frustratingly difficult, but if your constraints are not adding to the complexity, your best bet is to not, and just set your cookies to the domain. But if you like, one approach that would work: - Cert with SAN - CNAME's on the CF distribution - S3 Bucket And the sneaky bit: Use a cloudfront lambda to redirect "wrong" Hosts - comes with a cost, but it's super marginal. > Otherwise, your best approach is sadly a second cloudfront distribution with a different bucket (or bucket path) that just hosts a redirecting index key because you end up fighting stupid AWS design decisions. > Not that I've ever wasted stupid amounts of time on this particular problem... Doesn't this document[0] cover dealing with ssl on cloud front? Plus Amazon's Cert Manager? Or is it missing something? Pair that with an redirect/alias of www=>@ and you should be golden? [0]https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html https://docs.aws.amazon.com/AmazonCloudFront/latest/Develope...
- richardwhiuk 4y agoCould do a JS redirect, falling back to an iframe of the whole page?
- thesuitonym 4y agoIt's a problem with going `serverless', for sure. To anyone running a proper http server, it's trivial.
- dj_mc_merlin 4y ago> Not that I've ever wasted stupid amounts of time on this particular problem... I have also spent _too much time_ trying to get this to work. Gave up and used nginx instead.