More audit cleanup: shared route cache helper, url columns, tab keys
- One CACHE and json() in shape.js for the seven public route files - A url column type: link fields (13 of them) refuse javascript:, data: and any other scheme on save, not only when drawn - The chapter map's logo uses the shared Logo component - Schedule tabs take Home and End as well as the arrows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1c94ffb281
commit
d1a6332a45
12 changed files with 66 additions and 75 deletions
|
|
@ -302,5 +302,10 @@ export function loadFeaturedCards(db, ownerKind, ownerId) {
|
|||
|
||||
export { asBool };
|
||||
|
||||
/* Public reads may be cached a minute, and served a little stale
|
||||
while a fresh copy is fetched. json() sends a body with it. */
|
||||
export const CACHE = "public, max-age=60, stale-while-revalidate=300";
|
||||
export const json = (c, body) => c.json(body, 200, { "Cache-Control": CACHE });
|
||||
|
||||
// "?,?,?" for an IN (...) list of n values.
|
||||
export const marks = (n) => Array(n).fill("?").join(",");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue