Lack of URL encoding in preview URLs breaks AWS CloudFront

Builder content link

Builder public api key

Detailed steps to reproduce the bug

  1. Create a Next.js application for Builder
  2. Deploy it with SST (which deploys it to AWS)
  3. Try to create a page and preview it via Builder

Notice that on step 3, you’ll get the following error:

The link that the preview is trying to hit is

If you take the last query string parameter and URL encode it, you get the following link:

That link works. So the issue is that AWS Cloudfront can’t handle the : in the query string. In my opinion, this query string should be URL encoded to start never mind that it’s breaking my specific application.

Code stack you are integrating Builder with
Next.js, SST, & AWS.

Hi @vrio_dave,

We really appreciate you reporting this possible issue to us, we are going to investigate this further and deploy a possible solution. We will try to update you as soon as we have any insights on this. Thank you!