diff --git a/build.zig.zon b/build.zig.zon index 1b26cf6..ca80b40 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,6 +1,6 @@ .{ .name = .nullhub, - .version = "2026.3.13", + .version = "2026.3.21", .fingerprint = 0x8708b11cb233b548, .minimum_zig_version = "0.15.2", .dependencies = .{}, diff --git a/ui/vite.config.ts b/ui/vite.config.ts index 9ebaf70..e2020f7 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -1,11 +1,28 @@ import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vite'; +import { defineConfig, type ProxyOptions } from 'vite'; + +function createLocalApiProxy(): ProxyOptions { + return { + target: 'http://127.0.0.1:19800', + configure(proxy) { + proxy.on('proxyReq', (proxyReq) => { + // Keep local dev requests same-origin from the browser's perspective. + proxyReq.removeHeader('origin'); + }); + } + }; +} export default defineConfig({ plugins: [sveltekit()], server: { proxy: { - '/api': 'http://127.0.0.1:19800' + '/api': createLocalApiProxy() + } + }, + preview: { + proxy: { + '/api': createLocalApiProxy() } } });