Skip to content

Commit 09f78b9

Browse files
authored
fix: csp fixes
* fix: analytics req * fix: for now i must disable this * fix: tmp disable
1 parent c5362a3 commit 09f78b9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/config/shield.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ const shieldConfig = defineConfig({
1616
* to learn more
1717
*/
1818
csrf: {
19-
enabled: true,
19+
enabled: false,
2020
exceptRoutes: ["/user/login"],
21-
enableXsrfCookie: true,
21+
enableXsrfCookie: false,
2222
methods: ["POST", "PUT", "PATCH", "DELETE"],
2323
},
2424

frontend/src/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { auth } from "./lib/auth";
66
export async function middleware(request: NextRequest) {
77
const nonce = Buffer.from(crypto.randomUUID()).toString("base64");
88
const cspHeader = `
9-
default-src 'self' 'nonce-${nonce}' https://fonts.googleapis.com https://fonts.gstatic.com ${process.env.NODE_ENV === "development" ? "'unsafe-eval'" : ""};
9+
default-src 'self' 'nonce-${nonce}' https://fonts.googleapis.com https://fonts.gstatic.com https://analytics.solvro.pl;
1010
script-src 'self' 'nonce-${nonce}' 'strict-dynamic' ${process.env.NODE_ENV === "development" ? "'unsafe-eval'" : ""} https://analytics.solvro.pl;
1111
style-src 'self' 'nonce-${nonce}';
1212
img-src 'self' blob: data: https://avatars.githubusercontent.com https://wit.pwr.edu.pl https://cms.solvro.pl https://apps.usos.pwr.edu.pl;

0 commit comments

Comments
 (0)