Repository navigation
v1.9.0
- Added
throwRedirecttorequireAuth()to redirect unauthenticated visitors to a login page. - Added
titleTemplatesupport to middlewareheadDefaultsfor 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
copyLabeltovoidMarkdown()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_unavailableon 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.tsimports 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 };
});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