Skip to content

The Boring Stack 1.6.1

Latest

Choose a tag to compare

@DominusKelvin DominusKelvin released this 17 Sep 10:36
· 2 commits to main since this release

The Boring Stack 1.6.1 fixes Inertia visits that get stopped by Cloudflare or another service in front of your app. It ships in rsbuild-plugin-inertia@0.0.2.

Cloudflare challenges no longer get stuck in a modal

A Cloudflare challenge, WAF block, or proxy error page answers the request before Sails sees it. When that happened on an Inertia visit, Inertia showed its error modal with the challenge page stuck inside an iframe. The challenge could never finish there, so visitors were stuck. Visits include clicking a <Link>, submitting a form, or a background request like router.reload() or <InfiniteScroll>.

rsbuild-plugin-inertia@0.0.2 now sends those pages to the browser as a real page load:

  • A <Link> click or other GET visit loads the page the user was going to, so the challenge runs normally and they land where they meant to go.
  • A form submission reloads the current page, since a POST can't be repeated as a normal page load.
  • Background requests (router.reload(), polling, <InfiniteScroll>) reload the current page, so something like ?page=2 never becomes the address.
  • JSON errors and Inertia's own error responses still show Inertia's modal. In development, ordinary server errors also keep the modal so you can debug them.
  • Repeat failures for the same URL fall back to Inertia's modal instead of reloading forever.
  • It's added only to the browser bundle, never the SSR bundle.

You don't need to change app.js. All five templates now use rsbuild-plugin-inertia@^0.0.2.

Upgrade

Existing apps don't get this with npm update: ^0.0.1 only matches 0.0.1. Install the new version:

npm install -D rsbuild-plugin-inertia@^0.0.2

Then rebuild and deploy.

To keep Inertia's default modal, opt out in config/shipwright.js:

pluginInertia({ interstitials: false })

Closes #219 via #220.