Skip to content

v1.9.0

Choose a tag to compare

@cpojer cpojer released this 13 Nov 23:55
· 4 commits to main since this release
Immutable release. Only release title and notes can be modified.
  • Added throwRedirect to requireAuth() to redirect unauthenticated visitors to a login page.
  • Added titleTemplate support to middleware headDefaults for section-specific page titles.
  • Added automatic resolution of relative Open Graph and Twitter image URLs against the current request.
  • Added AI Gateway logging defaults to platform plans, with project-specific settings taking precedence.
  • Added copyLabel to voidMarkdown() for translating code-block copy-button tooltips.
  • Improved native Cloudflare deployments of SvelteKit, Nuxt, Analog, and Astro to serve static files and prerendered pages without Worker invocations, while respecting run_worker_first.
  • Fixed AI requests failing with 503 ai_logging_policy_unavailable on hosted Void Cloud.
  • Fixed Pages routers reporting the destination URL after a rewrite instead of the URL in the browser.
  • Fixed spurious React hydration errors on pages using deferred data.
  • Fixed Pages and island action redirects losing URL fragments.
  • Fixed loader c.notFound() responses being replaced by static files at the same URL.
  • Fixed ISR serving cached HTML to requests that negotiate Markdown.
  • Fixed Markdown task lists rendering as plain text instead of checkboxes.
  • Improved right-to-left Markdown layouts and fixed heading anchors overlapping text.
  • Improved errors when void.config.ts imports unsupported TypeScript path aliases.
  • Improved dashboard deployment logs so filters and time ranges survive navigation and background refreshes.

Thanks to @0froq, @harshbhx, @karthickeyan-dev, @morinokami for their contributions!

Authentication Redirects

Send unauthenticated visitors to your login page from loaders, actions, or middleware. The redirect stops execution and uses 303 after mutations:

import { defineHandler } from 'void';
import { requireAuth } from 'void/auth';

export const loader = defineHandler((c) => {
  const user = requireAuth(c, { throwRedirect: '/login' });
  return { email: user.email };
});

Protecting pages

Page Titles and Social Previews

Override title templates for a section through middleware. Social preview URLs can use relative paths and Void resolves them against the current request:

import { defineMiddleware } from 'void';

export default defineMiddleware(async (c, next) => {
  if (c.req.path.startsWith('/admin')) {
    c.set('headDefaults', {
      ...c.get('headDefaults'),
      titleTemplate: '%s | Admin',
      meta: [{ property: 'og:image', content: '/og-image.png' }],
    });
  }
  await next();
});

Middleware defaults · Social preview URLs

AI Logging Defaults

Set aiLogging in a plan file to choose the default for its projects. You can also change the default through Plans in the dashboard.

{
  "aiLogging": "metadata"
}
void platform config plans set team --file team-plan.json --yes

AI Gateway logging