cdk-turnkey / sredirect

Send redirects for domain names over HTTPS.
Apache License 2.0
0 stars 0 forks source link

Try making the distro origin the HTTP target #7

Closed douglasnaphas closed 2 years ago

douglasnaphas commented 2 years ago

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront_origins.HttpOrigin.html

Or a default of https://example.com.

Actually an S3Origin with a "something is wrong" HTML page might be better, since if they ever reach the origin, something went wrong.

Maybe an HTTP origin with the first redirect target if redirects is provided, an S3 origin with an error message otherwise.

douglasnaphas commented 2 years ago

Nope.

At least for Google Sites as the origin, this doesn't add anything compared to using a 302.

As soon as my douglas-naphas-org Google Sites page loaded with douglas-naphas.org as the location, it reloaded the origin's location.

More broadly, we would need cooperation from the origin for this to work smoothly. And there's no guarantee that the origin wouldn't be expecting something to be in the URL, so the Http Origin technique is fundamentally unwise.

Closing.

I may still allow the Redirect type in my lib/ to indicate an Http Origin, but I'm not going to implement it now--the only way to use Sredirect will be to get a 302 to your to-site.

Screen Shot 2022-02-07 at 7 18 59 PM