Rewrite Zammad API calls in config rather than middleware
This commit is contained in:
parent
f0e8e20c24
commit
781f8c380a
3 changed files with 17 additions and 5 deletions
|
|
@ -70,9 +70,6 @@ export default withAuth(checkRewrites, {
|
|||
callbacks: {
|
||||
authorized: ({ token, req }) => {
|
||||
const path = req.nextUrl.pathname;
|
||||
if (path.startsWith("/api/v1/")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (process.env.SETUP_MODE === "true") {
|
||||
return true;
|
||||
|
|
@ -95,6 +92,6 @@ export default withAuth(checkRewrites, {
|
|||
|
||||
export const config = {
|
||||
matcher: [
|
||||
"/((?!ws|wss|api/signal|api/whatsapp|api/facebook|_next/static|_next/image|favicon.ico).*)",
|
||||
"/((?!ws|wss|api/v1|api/signal|api/whatsapp|api/facebook|_next/static|_next/image|favicon.ico).*)",
|
||||
],
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue