github SonicJs-Org/sonicjs v3.0.0-beta.12

latest release: v3.0.0-beta.13
pre-release4 hours ago

Changes

  • fix(cors): apply CORS middleware globally so /auth/* routes work from Astro/Next.js/frontend frameworks
  • fix(forms): forms plugin no longer returns 500 when forms table hasn't been migrated — shows empty state instead
  • docs: added CORS configuration section to authentication.md and getting-started.md troubleshooting guide

CORS fix for Astro / frontend frameworks

If you're calling SonicJS from a separate frontend (Astro, Next.js, etc.), add your dev origin to wrangler.toml:

[vars]
CORS_ORIGINS = "http://localhost:8787,http://localhost:4321"

Then use credentials: 'include' in your fetch calls:

const res = await fetch('https://your-cms.workers.dev/auth/login', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ email, password }),
})

Installation

npm create sonicjs@beta my-app

Or update existing project:

npm install @sonicjs-cms/core@3.0.0-beta.12

Don't miss a new sonicjs release

NewReleases is sending notifications on new releases.