Skip to content

Commit

Permalink
rm default immutable headers
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino committed Sep 12, 2024
1 parent d9f444a commit d50685c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-meals-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"domco": minor
---

rm default immutable headers - leave to adapters instead
9 changes: 0 additions & 9 deletions packages/domco/src/app/mw/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
import { dirNames, headers } from "../../constants/index.js";
import type { CreateAppOptions } from "../../types/public/index.js";
import { setServer } from "../util/index.js";
import { trimTrailingSlash } from "hono/trailing-slash";

/** Middleware used in `dev` and `prod`. */
export const standardMiddleware: CreateAppOptions["middleware"] = [
{
// this can be applied in `dev` because static files are served directly from `src/`
path: `/${dirNames.out.client.immutable}/*`,
handler: async (c, next) => {
await next();
c.header("Cache-Control", headers.cacheControl.immutable);
},
},
{
path: "/*",
handler: setServer,
Expand Down

0 comments on commit d50685c

Please sign in to comment.