Add HTML app challenges

using_apps

#1

Hi Folks,

We are using the Add HTML app successfully to rewrite a legacy application’s Terms of Service links & some branding updates. This works well, and has helped us avoid a redeploy. Very popular with devs and marketing / legal.

Attempting to do a similar rewrite with a sibling app, we’ve run into some difficulties. The upstream app is on App Engine Standard:

  1. Difficulty installing the Add HTML app at all with a delegated access account (this seems to be a problem regardless). Installing the app / seeing an existing installed app seems to work okay with the domain owner’s account.
  2. Difficulty previewing the changes inline
    • In this case, it seems to be because the upstream application doesn’t like the _ query parameter added to the request within the preview iframe
    • Previewing works okay as long as we detach the frame and use the proxying preview through the *.p.cloudflare.works endpoint
  3. No (visible) effect on the deployed application once the changes are enabled through the site owner account

I am wondering if you could help us with some debugging here. The query parameter is unfortunately something the web framework on the source site is not happy with. Not much to do there, but could you confirm that the live proxy request does not add additional parameters to the GET?

Further, we’ve tried enabling the CloudFlare proxy :orange: and mapping to the upstream App Engine domain with both CNAME (ghs.googlehosted.com) and A / AAAA entries. This works fine on our other endpoint, but not here. There is no obvious change to the site, and we are not clear if any rewriting is happening at all. This has been tested with both CloudFlare DNS (1.1.1.1) and from other ISP-provided servers.

Thanks!


#2

Adding some nuances here (one always figures things out after filing a support case…)

I was able to confirm that the proxy was intercepting traffic (looking at upstream IPs from the Google side), and then did some review of the DOM targeting rules in the Add HTML piece, and simplified. Those now seem to be working and rewriting is fine. So, problem solved.

Some benefit maybe to this case, still:

  • Using the apps (or, at least, this one) from a delegate account seems problematic
  • The inconsistency between the previewer and the real behaviour of the rewriting engine made this a bunch harder

Anything I can do to help provide context for CloudFlare, let me know.


#3

Thanks for the feedback. The previewer is in an iframe when not on a separate tab, which could have been causing conflicts with CORs or other common issues with iframes. This is why we provide the option to view in a separate tab. Depending on your site this can be a tricky issue to track down. Thanks for sharing your experience and we will consider making this more obvious as we improve the platform.


#4

Thanks Victoria
Makes sense. All the best!