[{"data":1,"prerenderedAt":812,"buildId":813},["ShallowReactive",2],{"docs-navigation-en":3,"example-\u002Fexamples\u002Fssr-and-server-functions":50,"example-surround-\u002Fexamples\u002Fssr-and-server-functions":640,"examples-en":649},[4],{"title":5,"path":6,"stem":7,"children":8,"page":49},"Docs","\u002Fdocs","docs",[9,13,17,21,25,29,33,37,41,45],{"title":10,"path":11,"stem":12},"Getting started","\u002Fdocs\u002Fgetting-started","docs\u002F01.getting-started",{"title":14,"path":15,"stem":16},"verifyUser","\u002Fdocs\u002Fverify-user","docs\u002F02.verify-user",{"title":18,"path":19,"stem":20},"Sites without users","\u002Fdocs\u002Fsites-without-users","docs\u002F03.sites-without-users",{"title":22,"path":23,"stem":24},"Build-time route check","\u002Fdocs\u002Froute-coverage","docs\u002F04.route-coverage",{"title":26,"path":27,"stem":28},"Public routes","\u002Fdocs\u002Fpublic-routes","docs\u002F05.public-routes",{"title":30,"path":31,"stem":32},"Same-origin writes","\u002Fdocs\u002Fsame-origin","docs\u002F06.same-origin",{"title":34,"path":35,"stem":36},"Scope and caching","\u002Fdocs\u002Fscope","docs\u002F07.scope",{"title":38,"path":39,"stem":40},"Configuration","\u002Fdocs\u002Fconfiguration","docs\u002F08.configuration",{"title":42,"path":43,"stem":44},"Migrating an existing BFF guard","\u002Fdocs\u002Fmigration","docs\u002F09.migration",{"title":46,"path":47,"stem":48},"Contributing","\u002Fdocs\u002Fcontributing","docs\u002F10.contributing",false,{"id":51,"title":52,"body":53,"category":629,"description":630,"extension":631,"meta":632,"navigation":192,"order":189,"path":633,"seo":634,"stem":635,"uses":636,"__hash__":639},"examples_en\u002Fexamples\u002Fssr-and-server-functions.md","SSR and server functions",{"type":54,"value":55,"toc":625},"minimark",[56,65,70,84,281,288,292,295,382,455,614,621],[57,58,59,60,64],"p",{},"During server rendering, ",[61,62,63],"code",{},"useFetch('\u002Fapi\u002Forders')"," calls your API inside the same server. That call goes through the guard like any other, so it needs the user's Cookie.",[66,67,69],"h2",{"id":68},"forward-the-cookie","Forward the Cookie",[57,71,72,75,76,79,80,83],{},[61,73,74],{},"useFetch"," forwards the incoming request's headers for you. For a plain ",[61,77,78],{},"$fetch"," in a component, use ",[61,81,82],{},"useRequestFetch()",":",[85,86,92],"pre",{"className":87,"code":88,"filename":89,"language":90,"meta":91,"style":91},"language-vue shiki shiki-themes material-theme-lighter github-light github-dark","\u003Cscript setup lang=\"ts\">\n\u002F\u002F useFetch forwards the user's Cookie during SSR.\nconst { data: orders } = await useFetch('\u002Fapi\u002Forders')\n\n\u002F\u002F For a manual call, take the request-bound fetch.\nconst requestFetch = useRequestFetch()\nconst { data: profile } = await useAsyncData('profile', () => requestFetch('\u002Fapi\u002Fme'))\n\u003C\u002Fscript>\n","pages\u002Forders.vue","vue","",[61,93,94,130,137,187,194,200,216,271],{"__ignoreMap":91},[95,96,99,103,107,111,114,117,121,125,127],"span",{"class":97,"line":98},"line",1,[95,100,102],{"class":101},"sP7_E","\u003C",[95,104,106],{"class":105},"sQzsp","script",[95,108,110],{"class":109},"s9AJx"," setup",[95,112,113],{"class":109}," lang",[95,115,116],{"class":101},"=",[95,118,120],{"class":119},"sjJ54","\"",[95,122,124],{"class":123},"s_sjI","ts",[95,126,120],{"class":119},[95,128,129],{"class":101},">\n",[95,131,133],{"class":97,"line":132},2,[95,134,136],{"class":135},"sutJx","\u002F\u002F useFetch forwards the user's Cookie during SSR.\n",[95,138,140,144,147,151,153,157,160,164,168,172,176,179,182,184],{"class":97,"line":139},3,[95,141,143],{"class":142},"sbsja","const",[95,145,146],{"class":101}," {",[95,148,150],{"class":149},"sucvu"," data",[95,152,83],{"class":101},[95,154,156],{"class":155},"s_hVV"," orders",[95,158,159],{"class":101}," }",[95,161,163],{"class":162},"smGrS"," =",[95,165,167],{"class":166},"sVHd0"," await",[95,169,171],{"class":170},"sGLFI"," useFetch",[95,173,175],{"class":174},"su5hD","(",[95,177,178],{"class":119},"'",[95,180,181],{"class":123},"\u002Fapi\u002Forders",[95,183,178],{"class":119},[95,185,186],{"class":174},")\n",[95,188,190],{"class":97,"line":189},4,[95,191,193],{"emptyLinePlaceholder":192},true,"\n",[95,195,197],{"class":97,"line":196},5,[95,198,199],{"class":135},"\u002F\u002F For a manual call, take the request-bound fetch.\n",[95,201,203,205,208,210,213],{"class":97,"line":202},6,[95,204,143],{"class":142},[95,206,207],{"class":155}," requestFetch",[95,209,163],{"class":162},[95,211,212],{"class":170}," useRequestFetch",[95,214,215],{"class":174},"()\n",[95,217,219,221,223,225,227,230,232,234,236,239,241,243,246,248,251,254,257,259,261,263,266,268],{"class":97,"line":218},7,[95,220,143],{"class":142},[95,222,146],{"class":101},[95,224,150],{"class":149},[95,226,83],{"class":101},[95,228,229],{"class":155}," profile",[95,231,159],{"class":101},[95,233,163],{"class":162},[95,235,167],{"class":166},[95,237,238],{"class":170}," useAsyncData",[95,240,175],{"class":174},[95,242,178],{"class":119},[95,244,245],{"class":123},"profile",[95,247,178],{"class":119},[95,249,250],{"class":101},",",[95,252,253],{"class":101}," ()",[95,255,256],{"class":142}," =>",[95,258,207],{"class":170},[95,260,175],{"class":174},[95,262,178],{"class":119},[95,264,265],{"class":123},"\u002Fapi\u002Fme",[95,267,178],{"class":119},[95,269,270],{"class":174},"))\n",[95,272,274,277,279],{"class":97,"line":273},8,[95,275,276],{"class":101},"\u003C\u002F",[95,278,106],{"class":105},[95,280,129],{"class":101},[57,282,283,284,287],{},"A bare ",[61,285,286],{},"$fetch('\u002Fapi\u002Fme')"," during SSR does not carry the Cookie, and the guard answers 401.",[66,289,291],{"id":290},"skip-http-inside-the-server","Skip HTTP inside the server",[57,293,294],{},"When server code needs data, call a function instead of your own HTTP route. There is no second trip through the guard, and no internal route that could be called from outside.",[85,296,300],{"className":297,"code":298,"filename":299,"language":124,"meta":91,"style":91},"language-ts shiki shiki-themes material-theme-lighter github-light github-dark","export async function listOrders(userId: string) {\n  return await db.order.findMany({ where: { userId } })\n}\n","server\u002Futils\u002Forders.ts",[61,301,302,334,377],{"__ignoreMap":91},[95,303,304,307,310,313,316,318,322,324,328,331],{"class":97,"line":98},[95,305,306],{"class":166},"export",[95,308,309],{"class":142}," async",[95,311,312],{"class":142}," function",[95,314,315],{"class":170}," listOrders",[95,317,175],{"class":101},[95,319,321],{"class":320},"s99_P","userId",[95,323,83],{"class":162},[95,325,327],{"class":326},"sZMiF"," string",[95,329,330],{"class":101},")",[95,332,333],{"class":101}," {\n",[95,335,336,339,341,344,347,350,352,355,358,361,364,366,368,371,373,375],{"class":97,"line":132},[95,337,338],{"class":166},"  return",[95,340,167],{"class":166},[95,342,343],{"class":174}," db",[95,345,346],{"class":101},".",[95,348,349],{"class":174},"order",[95,351,346],{"class":101},[95,353,354],{"class":170},"findMany",[95,356,175],{"class":357},"skxfh",[95,359,360],{"class":101},"{",[95,362,363],{"class":357}," where",[95,365,83],{"class":101},[95,367,146],{"class":101},[95,369,370],{"class":174}," userId",[95,372,159],{"class":101},[95,374,159],{"class":101},[95,376,186],{"class":357},[95,378,379],{"class":97,"line":139},[95,380,381],{"class":101},"}\n",[85,383,386],{"className":297,"code":384,"filename":385,"language":124,"meta":91,"style":91},"import { defineBffHandler } from '#bff-guard'\n\nexport default defineBffHandler(event => listOrders(event.context.user!.id))\n","server\u002Fapi\u002Forders.get.ts",[61,387,388,412,416],{"__ignoreMap":91},[95,389,390,393,395,398,400,403,406,409],{"class":97,"line":98},[95,391,392],{"class":166},"import",[95,394,146],{"class":101},[95,396,397],{"class":174}," defineBffHandler",[95,399,159],{"class":101},[95,401,402],{"class":166}," from",[95,404,405],{"class":119}," '",[95,407,408],{"class":123},"#bff-guard",[95,410,411],{"class":119},"'\n",[95,413,414],{"class":97,"line":132},[95,415,193],{"emptyLinePlaceholder":192},[95,417,418,420,423,425,427,430,432,434,437,439,442,444,447,450,452],{"class":97,"line":139},[95,419,306],{"class":166},[95,421,422],{"class":166}," default",[95,424,397],{"class":170},[95,426,175],{"class":174},[95,428,429],{"class":320},"event",[95,431,256],{"class":142},[95,433,315],{"class":170},[95,435,436],{"class":174},"(event",[95,438,346],{"class":101},[95,440,441],{"class":174},"context",[95,443,346],{"class":101},[95,445,446],{"class":174},"user",[95,448,449],{"class":162},"!",[95,451,346],{"class":101},[95,453,454],{"class":174},"id))\n",[85,456,459],{"className":297,"code":457,"filename":458,"language":124,"meta":91,"style":91},"\u002F\u002F A Nitro task: no user, no HTTP, no guard needed.\nexport default defineTask({\n  meta: { description: 'Send order reminders' },\n  async run() {\n    for (const user of await usersWithOpenOrders()) {\n      await sendReminder(user, await listOrders(user.id))\n    }\n    return { result: 'ok' }\n  },\n})\n","server\u002Ftasks\u002Fsend-reminders.ts",[61,460,461,466,480,504,518,544,573,578,600,606],{"__ignoreMap":91},[95,462,463],{"class":97,"line":98},[95,464,465],{"class":135},"\u002F\u002F A Nitro task: no user, no HTTP, no guard needed.\n",[95,467,468,470,472,475,477],{"class":97,"line":132},[95,469,306],{"class":166},[95,471,422],{"class":166},[95,473,474],{"class":170}," defineTask",[95,476,175],{"class":174},[95,478,479],{"class":101},"{\n",[95,481,482,485,487,489,492,494,496,499,501],{"class":97,"line":139},[95,483,484],{"class":357},"  meta",[95,486,83],{"class":101},[95,488,146],{"class":101},[95,490,491],{"class":357}," description",[95,493,83],{"class":101},[95,495,405],{"class":119},[95,497,498],{"class":123},"Send order reminders",[95,500,178],{"class":119},[95,502,503],{"class":101}," },\n",[95,505,506,509,513,516],{"class":97,"line":189},[95,507,508],{"class":142},"  async",[95,510,512],{"class":511},"sVXei"," run",[95,514,515],{"class":101},"()",[95,517,333],{"class":101},[95,519,520,523,526,528,531,534,536,539,542],{"class":97,"line":196},[95,521,522],{"class":166},"    for",[95,524,525],{"class":357}," (",[95,527,143],{"class":142},[95,529,530],{"class":155}," user",[95,532,533],{"class":162}," of",[95,535,167],{"class":166},[95,537,538],{"class":170}," usersWithOpenOrders",[95,540,541],{"class":357},"()) ",[95,543,479],{"class":101},[95,545,546,549,552,554,556,558,560,562,564,566,568,571],{"class":97,"line":202},[95,547,548],{"class":166},"      await",[95,550,551],{"class":170}," sendReminder",[95,553,175],{"class":357},[95,555,446],{"class":174},[95,557,250],{"class":101},[95,559,167],{"class":166},[95,561,315],{"class":170},[95,563,175],{"class":357},[95,565,446],{"class":174},[95,567,346],{"class":101},[95,569,570],{"class":174},"id",[95,572,270],{"class":357},[95,574,575],{"class":97,"line":218},[95,576,577],{"class":101},"    }\n",[95,579,580,583,585,588,590,592,595,597],{"class":97,"line":273},[95,581,582],{"class":166},"    return",[95,584,146],{"class":101},[95,586,587],{"class":357}," result",[95,589,83],{"class":101},[95,591,405],{"class":119},[95,593,594],{"class":123},"ok",[95,596,178],{"class":119},[95,598,599],{"class":101}," }\n",[95,601,603],{"class":97,"line":602},9,[95,604,605],{"class":101},"  },\n",[95,607,609,612],{"class":97,"line":608},10,[95,610,611],{"class":101},"}",[95,613,186],{"class":174},[57,615,616,617,620],{},"Do not create \"internal\" HTTP routes that skip the user check because only your server calls them. Anything under ",[61,618,619],{},"server\u002Fapi"," is reachable from the internet.",[622,623,624],"style",{},"html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sQzsp, html code.shiki .sQzsp{--shiki-light:#E53935;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s9AJx, html code.shiki .s9AJx{--shiki-light:#9C3EDA;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sucvu, html code.shiki .sucvu{--shiki-light:#E53935;--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sVXei, html code.shiki .sVXei{--shiki-light:#E53935;--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":91,"searchDepth":132,"depth":132,"links":626},[627,628],{"id":68,"depth":132,"text":69},{"id":290,"depth":132,"text":291},"patterns","Call your own API during server rendering, or skip HTTP entirely.","md",{},"\u002Fexamples\u002Fssr-and-server-functions",{"title":52,"description":630},"examples\u002Fssr-and-server-functions",[74,637,638],"useRequestFetch","server\u002Futils","bCseeqEt9AWOpcN-zn3-BQXXchrltduqCvA3y4tudFA",[641,645],{"path":642,"title":643,"description":644,"category":629,"order":139},"\u002Fexamples\u002Fupstream-proxy","Calling an upstream API","Attach the user's token after the guard, never in middleware or routeRules.proxy.",{"path":646,"title":647,"description":648,"category":629,"order":196},"\u002Fexamples\u002Fwebhooks","Webhooks","Server-to-server callbacks belong outside server\u002Fapi, with their own signature check.",[650,659,666,672,677,684,692,700,707,715,723,730,738,745,751,758,765,771,774,776,781,787,793,798,805],{"path":651,"title":652,"description":653,"category":654,"order":98,"uses":655},"\u002Fexamples\u002Fcontact-form","Contact form on a corporate site","A mail-sending route that only your own pages can call, with a bot check and a rate limit.","visitor",[656,657,658],"access: 'visitor'","@nuxtjs\u002Fturnstile","nuxt-security",{"path":660,"title":661,"description":662,"category":654,"order":132,"uses":663},"\u002Fexamples\u002Fpaid-api-proxy","Search box that calls a paid API","Keep other sites and scripts from spending your API quota through your BFF.",[656,664,665],"rateLimiter","defineCachedFunction",{"path":667,"title":668,"description":669,"category":654,"order":139,"uses":670},"\u002Fexamples\u002Fclient-data","JSON for client-side pages","Data that your pages fetch in the browser, kept from being embedded by other sites.",[656,671,74],"access: 'public'",{"path":673,"title":674,"description":675,"category":654,"order":189,"uses":676},"\u002Fexamples\u002Fmember-site-contact","Visitor routes inside a member app","Keep 'user' as the default and open a few routes to visitors without accounts.",[656,14],{"path":678,"title":679,"description":680,"category":681,"order":98,"uses":682},"\u002Fexamples\u002Fnuxt-auth-utils","nuxt-auth-utils","Use the sealed Cookie session of nuxt-auth-utils as the user check.","auth",[679,683],"requireUserSession",{"path":685,"title":686,"description":687,"category":681,"order":132,"uses":688},"\u002Fexamples\u002Fsidebase-nuxt-auth","Auth.js with @sidebase\u002Fnuxt-auth","Check the Auth.js session, and accept the same JWT as a Bearer token.",[689,690,691],"@sidebase\u002Fnuxt-auth","getServerSession","getToken",{"path":693,"title":694,"description":695,"category":681,"order":139,"uses":696},"\u002Fexamples\u002Fsupabase","Supabase","Verify the Supabase session with getClaims, and tell bad tokens from outages.",[697,698,699],"@nuxtjs\u002Fsupabase","getClaims","isAuthRetryableFetchError",{"path":701,"title":702,"description":703,"category":681,"order":189,"uses":704},"\u002Fexamples\u002Fclerk","Clerk","Read the auth object that Clerk's middleware put on the event.",[705,706],"@clerk\u002Fnuxt","event.context.auth",{"path":708,"title":709,"description":710,"category":681,"order":196,"uses":711},"\u002Fexamples\u002Ffirebase","Firebase Authentication","Session Cookies for the browser, ID tokens for apps, and error codes mapped to 401 or 503.",[712,713,714],"firebase-admin","verifySessionCookie","verifyIdToken",{"path":716,"title":717,"description":718,"category":681,"order":202,"uses":719},"\u002Fexamples\u002Fjwt-jose","Any OpenID Connect provider (JWT)","Verify access tokens from Auth0, Keycloak, Cognito, Entra ID and others with jose.",[720,721,722],"jose","jwtVerify","createRemoteJWKSet",{"path":724,"title":725,"description":726,"category":727,"order":98,"uses":728},"\u002Fexamples\u002Fnuxt-security-rate-limit","Rate limits with nuxt-security","Slow down credential stuffing and token guessing before verifyUser runs.","security",[658,664,729],"routeRules",{"path":731,"title":732,"description":733,"category":727,"order":132,"uses":734},"\u002Fexamples\u002Fnuxt-security-headers","Headers, CSP and request limits with nuxt-security","A baseline nuxt-security setup next to the guard, tuned for a BFF.",[658,735,736,737],"headers","requestSizeLimiter","allowedMethodsRestricter",{"path":739,"title":740,"description":741,"category":727,"order":139,"uses":742},"\u002Fexamples\u002Fnuxt-csurf","CSRF tokens with nuxt-csurf","Add a synchronizer token on top of the origin check, without breaking Bearer clients.",[743,744,729],"nuxt-csurf","useCsrfFetch",{"path":746,"title":747,"description":748,"category":727,"order":189,"uses":749},"\u002Fexamples\u002Fturnstile","Bot checks on public routes with Turnstile","Public sign-in and sign-up routes skip verifyUser, so give them their own check.",[657,750],"verifyTurnstileToken",{"path":752,"title":753,"description":754,"category":727,"order":196,"uses":755},"\u002Fexamples\u002Fcors-bearer-clients","A frontend on another origin","CORS with nuxt-security for a separate app that calls the BFF with Bearer tokens.",[658,756,757],"corsHandler","viaBearer",{"path":759,"title":760,"description":761,"category":629,"order":98,"uses":762},"\u002Fexamples\u002Frecord-authorization","Per-record authorization","The guard says who the user is. The handler decides what they may touch.",[763,764],"event.context","createError",{"path":766,"title":767,"description":768,"category":629,"order":132,"uses":769},"\u002Fexamples\u002Froles","Roles and app-wide access","Reject whole groups of users in verifyUser, and check roles per route.",[14,770],"403",{"path":642,"title":643,"description":644,"category":629,"order":139,"uses":772},[78,773,638],"routeRules.proxy",{"path":633,"title":52,"description":630,"category":629,"order":189,"uses":775},[74,637,638],{"path":646,"title":647,"description":648,"category":629,"order":196,"uses":777},[778,779,780],"server\u002Froutes","readRawBody","xssValidator",{"path":782,"title":783,"description":784,"category":629,"order":202,"uses":785},"\u002Fexamples\u002Fbearer-clients","Mobile apps and CLI tools","One BFF for the browser and for clients that send Bearer tokens.",[757,786],"Authorization",{"path":788,"title":789,"description":790,"category":629,"order":218,"uses":791},"\u002Fexamples\u002Fmore-route-folders","Checking more folders at build time","Extend routePatterns to server\u002Froutes and layers.",[792],"routePatterns",{"path":794,"title":795,"description":796,"category":629,"order":273,"uses":797},"\u002Fexamples\u002Fpublic-cache","Caching public data","Cache what is the same for everyone on a separate public route.",[665,671],{"path":799,"title":800,"description":801,"category":629,"order":602,"uses":802},"\u002Fexamples\u002Fclient-errors","Handling 401, 403 and 503 in the app","Sign out on 401, explain 403, retry on 503.",[803,804],"$fetch.create","onResponseError",{"path":806,"title":807,"description":808,"category":629,"order":608,"uses":809},"\u002Fexamples\u002Ftesting","Testing the protection","An end-to-end test that every protected route refuses anonymous calls.",[810,811],"@nuxt\u002Ftest-utils","vitest",1796451484075,"a99f93bd-e267-45a7-90df-9194cd77468d"]