Custom errors: Injected CaptchaBox and Next.js

I’m using Next.js to generate static html for the custom error pages.
I started doing the ::CLOUDFLARE_ERROR_1000s_BOX:: page and everything went smoothly.
Then when it came to the ::CAPTCHA_BOX::, everything looks like it’s ok, my html is alright, but when published as a custom error page in Cloudflare, it will leave a bunch of javascript in the body #text node.

I tried stripping the Next.js project down to only render out the main body with<div>::CAPTCHA_BOX::</div>, but with the same result.

I hid it by setting font-size: 0px on body and otherwise it seems to work fine, but it would be nice to find a solution for this, also leaving this here for others that might be getting a similar result.

See the last line, line 60, this is where the body #text starts:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.