From f6e44ef00152c7b41dcff6b7967b220e8a0bf09c Mon Sep 17 00:00:00 2001 From: byt3h3ad Date: Sat, 18 May 2024 23:38:23 +0530 Subject: [PATCH] new file: nextjs/debug-fetch-requests.md --- nextjs/debug-fetch-requests.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nextjs/debug-fetch-requests.md diff --git a/nextjs/debug-fetch-requests.md b/nextjs/debug-fetch-requests.md new file mode 100644 index 0000000..a7fb6c6 --- /dev/null +++ b/nextjs/debug-fetch-requests.md @@ -0,0 +1,22 @@ +# Debug Next.js Fetch Requests + +Make the following change in the `next.config.js` file - + +```javascript +/** @type {import('next').NextConfig} */ +const nextConfig = { + logging: { + fetches: { + fullUrl: true, + }, + }, +}; + +module.exports = nextConfig; +``` + +This will log the requests in the console when running the app in development mode. + +[source](https://x.com/asidorenko_/status/1791537169468698965) + +[docs](https://nextjs.org/docs/app/api-reference/next-config-js/logging)