perf: fetch data server side for /settings/webhooks (#20583)
* update client components * update server components * update middleware * fix * fix --------- Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
1 parent
e9b5aa6f22
commit
134086f229
12 files changed
+144
-98
No files matched your search
@@ -18,7 +18,10 @@ const safeGet = async <T = any>(key: string): Promise<T | undefined> => {
|
||||
|
||||
export const POST_METHODS_ALLOWED_API_ROUTES = ["/api/"]; // trailing slash in "/api/" is actually important to block edge cases like `/api.php`
|
||||
// Some app routes are allowed because "revalidatePath()" is used to revalidate the cache for them
|
||||
export const POST_METHODS_ALLOWED_APP_ROUTES = ["/settings/my-account/general"];
|
||||
export const POST_METHODS_ALLOWED_APP_ROUTES = [
|
||||
"/settings/my-account/general",
|
||||
"/settings/developer/webhooks",
|
||||
];
|
||||
|
||||
export function checkPostMethod(req: NextRequest) {
|
||||
const pathname = req.nextUrl.pathname;
|
||||
|
||||
Reference in new issue
Block a user