feat: log redirect (#17307)
This commit is contained in:
parent
3b73b60402
commit
c97564446c
|
|
@ -26,6 +26,11 @@ const rofetch = createFetch().create({
|
|||
headers: {
|
||||
'user-agent': config.ua,
|
||||
},
|
||||
onResponse({ request, response }) {
|
||||
if (response.redirected) {
|
||||
logger.http(`Redirecting to ${response.url} for ${request}`);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export default rofetch;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
"scripts": {
|
||||
"build": "tsx scripts/workflow/build-routes.ts",
|
||||
"build:docs": "tsx scripts/workflow/build-docs.ts",
|
||||
"dev": "cross-env NODE_ENV=dev tsx watch --clear-screen=false lib/index.ts",
|
||||
"dev": "cross-env NODE_ENV=dev tsx watch --inspect --clear-screen=false lib/index.ts",
|
||||
"dev:cache": "cross-env NODE_ENV=production tsx watch --clear-screen=false lib/index.ts",
|
||||
"format": "prettier \"**/*.{ts,tsx,js,json}\" --write && eslint --cache --fix \"**/*.{ts,tsx,js,yml}\"",
|
||||
"format:check": "prettier \"**/*.{ts,tsx,js,json}\" --check && eslint --cache \"**/*.{ts,tsx,js,yml}\"",
|
||||
|
|
|
|||
Loading…
Reference in New Issue