webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Expose configuration for website app preview Cloudfront

Open timruppert opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

We are currently configuring our website domain and would like the preview domain to also be configurable, but it's not exposed in the app.resources during the createWebsiteApp function.

Describe the feature's behavior.

When a user is working with the page builder, and they want to see work in progress, they get taken to the prerendering service and it's on an internal domain. We'd like to expose that so that our users would be taken to something like web-preview.mydomain.com

Describe alternatives you've considered.

Leaving the configuration free and manually managing it. It is working at the moment because the custom headers are not applied to it - so it works if I add our wild card cert and alternate domain name to cloud front and configure the front end. Longer term, it'd be better to have this be something that's scripted :)

timruppert avatar Sep 12 '22 08:09 timruppert

@timruppert @adrians5j does this look acceptable?

CleanShot 2022-09-16 at 18 56 14

I'm trying to come up with the simplest possible solution. This one seems rather simple, but it will require you to have both delivery and preview domains be handled by the same certificate.

Alternatively, we can do this, to completely detach preview and delivery domains configuration:

CleanShot 2022-09-16 at 18 57 34

Awaiting your feedback :)

Pavel910 avatar Sep 16 '22 16:09 Pavel910

I'd like to implement 2nd solution. @Pavel910 can you green-light it please?

adrians5j avatar Oct 07 '22 13:10 adrians5j

@adrians5j let's go with the 2nd option 👍

Pavel910 avatar Oct 07 '22 13:10 Pavel910

Thanks! Will submit PR soon!

adrians5j avatar Oct 07 '22 13:10 adrians5j