Clean up middleware, add security-headers to non-Zammad pages
This commit is contained in:
parent
027aac3a92
commit
8c6e954fdf
9 changed files with 81 additions and 62 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import { getServerSession } from "app/_lib/authentication";
|
||||
import { redirect } from "next/navigation";
|
||||
import { cookies } from "next/headers";
|
||||
|
||||
const getHeaders = async () => {
|
||||
|
|
@ -8,8 +7,6 @@ const getHeaders = async () => {
|
|||
const headers = {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
// @ts-ignore
|
||||
"X-CSRF-Token": session.user.zammadCsrfToken,
|
||||
"X-Browser-Fingerprint": `${session.expires}`,
|
||||
Cookie: allCookies
|
||||
.map((cookie: any) => `${cookie.name}=${cookie.value}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue