Compare commits

...

3 Commits

Author SHA1 Message Date
ekzyis a7066a34cd
Use default-src 'self' a.stacker.news (#1349)
This should fix CSP errors in Firefox because scripts fetched via <link rel="prefetch"> don't use script-src.
2024-09-02 12:58:14 -05:00
ekzyis 07ebc60bc3
Use undefined instead of empty function for onHide (#1348) 2024-09-02 12:57:16 -05:00
ekzyis 5e77106297
Undelete bio items (#1346) 2024-09-02 12:02:47 -05:00
3 changed files with 6 additions and 2 deletions

View File

@ -70,7 +70,7 @@ export default function useModal () {
return (
<Modal
onHide={keepOpen ? () => {} : onClose} show={!!content}
onHide={keepOpen ? undefined : onClose} show={!!content}
className={className}
dialogClassName={className}
contentClassName={className}

View File

@ -83,7 +83,7 @@ export function middleware (request) {
const cspHeader = [
// if something is not explicitly allowed, we don't allow it.
"default-src 'none'",
"default-src 'self' a.stacker.news",
"font-src 'self' a.stacker.news",
// we want to load images from everywhere but we can limit to HTTPS at least
"img-src 'self' a.stacker.news m.stacker.news https: data: blob:" + devSrc,

View File

@ -0,0 +1,4 @@
-- we had a bug where it was possible to delete bios, this migration will restore them
UPDATE "Item"
SET "deletedAt" = NULL
WHERE "bio"