Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
1234567891011121314#!/usr/bin/env node// the cloudflare adapter writes _headers during `vite build`, so this runs// after it and rewrites what it left. a node build has no such file: nothing to// do, and nothing to fail onimport { existsSync, readFileSync, writeFileSync } from "node:fs";import { hardenAssetHeaders } from "../src/lib/assetHeaders.ts";
const path = ".svelte-kit/cloudflare/_headers";if (existsSync(path)) { const hardened = hardenAssetHeaders(readFileSync(path, "utf8")); writeFileSync(path, hardened); console.log("asset-headers: immutable misses now revalidate");}