Skip to content

sql-formatter javascript is not now working with CloudFlare rocketloader #1969

Open

Description

@fgregg

This is probably not a bug with datasette, but I thought you might want to know, @simonw.

I noticed today that my CloudFlare proxied datasette instance lost the "Format SQL" option. I'm pretty sure it was there last week.

In the CloudFlare settings, if I turn off Rocket Loader, I get the "Format SQL" option back.

Rocket Loader works by asynchronously loading the javascript, so maybe there was a recent change that doesn't play well with the asynch loading?

I'm up to date with e03aed0

Activity

  1. leo7martins commented on Nov 21, 2026

    @leo7martins

    I've opened a PR for this: both SQL editor <script> tags (sql-formatter and the CodeMirror bundle) now carry data-cfasync="false", the opt-out documented by Cloudflare for Rocket Loader. The attribute is ignored by browsers, so nothing changes for instances not behind Cloudflare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions