[{"data":1,"prerenderedAt":867,"buildId":868},["ShallowReactive",2],{"docs-navigation-en":3,"example-\u002Fexamples\u002Fpaid-api-proxy":50,"example-surround-\u002Fexamples\u002Fpaid-api-proxy":695,"examples-en":704},[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":155,"description":684,"extension":685,"meta":686,"navigation":531,"order":97,"path":687,"seo":688,"stem":689,"uses":690,"__hash__":694},"examples_en\u002Fexamples\u002Fpaid-api-proxy.md","Search box that calls a paid API",{"type":54,"value":55,"toc":682},"minimark",[56,60,275,498,664,671,678],[57,58,59],"p",{},"A search box, a translation widget or an AI assistant on a public site often calls a paid API with your key. The key stays on the server, but the BFF route itself becomes a free proxy to that API unless you protect it.",[61,62,68],"pre",{"className":63,"code":64,"filename":65,"language":66,"meta":67,"style":67},"language-ts shiki shiki-themes material-theme-lighter github-light github-dark","export default defineNuxtConfig({\n  modules: ['@kurashina-design\u002Fnuxt-bff-guard', 'nuxt-security'],\n  bffGuard: { access: 'visitor' },\n  runtimeConfig: { searchApiKey: '' }, \u002F\u002F NUXT_SEARCH_API_KEY\n  routeRules: {\n    '\u002Fapi\u002Fsearch': {\n      security: { rateLimiter: { tokensPerInterval: 30, interval: 60_000 } },\n    },\n  },\n})\n","nuxt.config.ts","ts","",[69,70,71,95,135,161,186,197,213,254,260,266],"code",{"__ignoreMap":67},[72,73,76,80,83,87,91],"span",{"class":74,"line":75},"line",1,[72,77,79],{"class":78},"sVHd0","export",[72,81,82],{"class":78}," default",[72,84,86],{"class":85},"sGLFI"," defineNuxtConfig",[72,88,90],{"class":89},"su5hD","(",[72,92,94],{"class":93},"sP7_E","{\n",[72,96,98,102,105,108,112,116,118,121,124,127,129,132],{"class":74,"line":97},2,[72,99,101],{"class":100},"skxfh","  modules",[72,103,104],{"class":93},":",[72,106,107],{"class":89}," [",[72,109,111],{"class":110},"sjJ54","'",[72,113,115],{"class":114},"s_sjI","@kurashina-design\u002Fnuxt-bff-guard",[72,117,111],{"class":110},[72,119,120],{"class":93},",",[72,122,123],{"class":110}," '",[72,125,126],{"class":114},"nuxt-security",[72,128,111],{"class":110},[72,130,131],{"class":89},"]",[72,133,134],{"class":93},",\n",[72,136,138,141,143,146,149,151,153,156,158],{"class":74,"line":137},3,[72,139,140],{"class":100},"  bffGuard",[72,142,104],{"class":93},[72,144,145],{"class":93}," {",[72,147,148],{"class":100}," access",[72,150,104],{"class":93},[72,152,123],{"class":110},[72,154,155],{"class":114},"visitor",[72,157,111],{"class":110},[72,159,160],{"class":93}," },\n",[72,162,164,167,169,171,174,176,179,182],{"class":74,"line":163},4,[72,165,166],{"class":100},"  runtimeConfig",[72,168,104],{"class":93},[72,170,145],{"class":93},[72,172,173],{"class":100}," searchApiKey",[72,175,104],{"class":93},[72,177,178],{"class":110}," ''",[72,180,181],{"class":93}," },",[72,183,185],{"class":184},"sutJx"," \u002F\u002F NUXT_SEARCH_API_KEY\n",[72,187,189,192,194],{"class":74,"line":188},5,[72,190,191],{"class":100},"  routeRules",[72,193,104],{"class":93},[72,195,196],{"class":93}," {\n",[72,198,200,203,207,209,211],{"class":74,"line":199},6,[72,201,202],{"class":110},"    '",[72,204,206],{"class":205},"sZUrc","\u002Fapi\u002Fsearch",[72,208,111],{"class":110},[72,210,104],{"class":93},[72,212,196],{"class":93},[72,214,216,219,221,223,226,228,230,233,235,239,241,244,246,249,252],{"class":74,"line":215},7,[72,217,218],{"class":100},"      security",[72,220,104],{"class":93},[72,222,145],{"class":93},[72,224,225],{"class":100}," rateLimiter",[72,227,104],{"class":93},[72,229,145],{"class":93},[72,231,232],{"class":100}," tokensPerInterval",[72,234,104],{"class":93},[72,236,238],{"class":237},"srdBf"," 30",[72,240,120],{"class":93},[72,242,243],{"class":100}," interval",[72,245,104],{"class":93},[72,247,248],{"class":237}," 60_000",[72,250,251],{"class":93}," }",[72,253,160],{"class":93},[72,255,257],{"class":74,"line":256},8,[72,258,259],{"class":93},"    },\n",[72,261,263],{"class":74,"line":262},9,[72,264,265],{"class":93},"  },\n",[72,267,269,272],{"class":74,"line":268},10,[72,270,271],{"class":93},"}",[72,273,274],{"class":89},")\n",[61,276,279],{"className":63,"code":277,"filename":278,"language":66,"meta":67,"style":67},"\u002F\u002F Identical queries within 10 minutes are answered from the cache, not the paid API.\nexport const searchCatalog = defineCachedFunction(async (query: string) => {\n  return await $fetch\u003CSearchResult[]>('https:\u002F\u002Fsearch.example\u002Fv1\u002Fquery', {\n    headers: { 'x-api-key': useRuntimeConfig().searchApiKey },\n    query: { q: query, limit: 10 },\n  })\n}, { maxAge: 600, name: 'search', getKey: (query: string) => query.toLowerCase() })\n","server\u002Futils\u002Fsearch.ts",[69,280,281,286,331,368,400,429,436],{"__ignoreMap":67},[72,282,283],{"class":74,"line":75},[72,284,285],{"class":184},"\u002F\u002F Identical queries within 10 minutes are answered from the cache, not the paid API.\n",[72,287,288,290,294,298,302,305,307,310,313,317,319,323,326,329],{"class":74,"line":97},[72,289,79],{"class":78},[72,291,293],{"class":292},"sbsja"," const",[72,295,297],{"class":296},"s_hVV"," searchCatalog",[72,299,301],{"class":300},"smGrS"," =",[72,303,304],{"class":85}," defineCachedFunction",[72,306,90],{"class":89},[72,308,309],{"class":292},"async",[72,311,312],{"class":93}," (",[72,314,316],{"class":315},"s99_P","query",[72,318,104],{"class":300},[72,320,322],{"class":321},"sZMiF"," string",[72,324,325],{"class":93},")",[72,327,328],{"class":292}," =>",[72,330,196],{"class":93},[72,332,333,336,339,342,345,349,352,355,357,359,362,364,366],{"class":74,"line":137},[72,334,335],{"class":78},"  return",[72,337,338],{"class":78}," await",[72,340,341],{"class":85}," $fetch",[72,343,344],{"class":93},"\u003C",[72,346,348],{"class":347},"sbgvK","SearchResult",[72,350,351],{"class":100},"[]",[72,353,354],{"class":93},">",[72,356,90],{"class":100},[72,358,111],{"class":110},[72,360,361],{"class":114},"https:\u002F\u002Fsearch.example\u002Fv1\u002Fquery",[72,363,111],{"class":110},[72,365,120],{"class":93},[72,367,196],{"class":93},[72,369,370,373,375,377,379,382,384,386,389,392,395,398],{"class":74,"line":163},[72,371,372],{"class":100},"    headers",[72,374,104],{"class":93},[72,376,145],{"class":93},[72,378,123],{"class":110},[72,380,381],{"class":205},"x-api-key",[72,383,111],{"class":110},[72,385,104],{"class":93},[72,387,388],{"class":85}," useRuntimeConfig",[72,390,391],{"class":100},"()",[72,393,394],{"class":93},".",[72,396,397],{"class":89},"searchApiKey",[72,399,160],{"class":93},[72,401,402,405,407,409,412,414,417,419,422,424,427],{"class":74,"line":188},[72,403,404],{"class":100},"    query",[72,406,104],{"class":93},[72,408,145],{"class":93},[72,410,411],{"class":100}," q",[72,413,104],{"class":93},[72,415,416],{"class":89}," query",[72,418,120],{"class":93},[72,420,421],{"class":100}," limit",[72,423,104],{"class":93},[72,425,426],{"class":237}," 10",[72,428,160],{"class":93},[72,430,431,434],{"class":74,"line":199},[72,432,433],{"class":93},"  }",[72,435,274],{"class":100},[72,437,438,441,443,446,448,451,453,456,458,460,463,465,467,470,472,474,476,478,480,482,484,486,488,491,494,496],{"class":74,"line":215},[72,439,440],{"class":93},"},",[72,442,145],{"class":93},[72,444,445],{"class":100}," maxAge",[72,447,104],{"class":93},[72,449,450],{"class":237}," 600",[72,452,120],{"class":93},[72,454,455],{"class":100}," name",[72,457,104],{"class":93},[72,459,123],{"class":110},[72,461,462],{"class":114},"search",[72,464,111],{"class":110},[72,466,120],{"class":93},[72,468,469],{"class":85}," getKey",[72,471,104],{"class":93},[72,473,312],{"class":93},[72,475,316],{"class":315},[72,477,104],{"class":300},[72,479,322],{"class":321},[72,481,325],{"class":93},[72,483,328],{"class":292},[72,485,416],{"class":89},[72,487,394],{"class":93},[72,489,490],{"class":85},"toLowerCase",[72,492,493],{"class":89},"() ",[72,495,271],{"class":93},[72,497,274],{"class":89},[61,499,502],{"className":63,"code":500,"filename":501,"language":66,"meta":67,"style":67},"import { defineBffHandler } from '#bff-guard'\n\nexport default defineBffHandler(async (event) => {\n  const q = String(getQuery(event).q ?? '').trim().slice(0, 100)\n  if (q.length \u003C 2) return []\n  return await searchCatalog(q)\n})\n","server\u002Fapi\u002Fsearch.get.ts",[69,503,504,527,533,556,615,644,658],{"__ignoreMap":67},[72,505,506,509,511,514,516,519,521,524],{"class":74,"line":75},[72,507,508],{"class":78},"import",[72,510,145],{"class":93},[72,512,513],{"class":89}," defineBffHandler",[72,515,251],{"class":93},[72,517,518],{"class":78}," from",[72,520,123],{"class":110},[72,522,523],{"class":114},"#bff-guard",[72,525,526],{"class":110},"'\n",[72,528,529],{"class":74,"line":97},[72,530,532],{"emptyLinePlaceholder":531},true,"\n",[72,534,535,537,539,541,543,545,547,550,552,554],{"class":74,"line":137},[72,536,79],{"class":78},[72,538,82],{"class":78},[72,540,513],{"class":85},[72,542,90],{"class":89},[72,544,309],{"class":292},[72,546,312],{"class":93},[72,548,549],{"class":315},"event",[72,551,325],{"class":93},[72,553,328],{"class":292},[72,555,196],{"class":93},[72,557,558,561,563,565,568,570,573,575,577,579,581,584,587,589,591,593,596,598,600,603,605,608,610,613],{"class":74,"line":163},[72,559,560],{"class":292},"  const",[72,562,411],{"class":296},[72,564,301],{"class":300},[72,566,567],{"class":85}," String",[72,569,90],{"class":100},[72,571,572],{"class":85},"getQuery",[72,574,90],{"class":100},[72,576,549],{"class":89},[72,578,325],{"class":100},[72,580,394],{"class":93},[72,582,583],{"class":89},"q",[72,585,586],{"class":300}," ??",[72,588,178],{"class":110},[72,590,325],{"class":100},[72,592,394],{"class":93},[72,594,595],{"class":85},"trim",[72,597,391],{"class":100},[72,599,394],{"class":93},[72,601,602],{"class":85},"slice",[72,604,90],{"class":100},[72,606,607],{"class":237},"0",[72,609,120],{"class":93},[72,611,612],{"class":237}," 100",[72,614,274],{"class":100},[72,616,617,620,622,624,626,629,632,635,638,641],{"class":74,"line":188},[72,618,619],{"class":78},"  if",[72,621,312],{"class":100},[72,623,583],{"class":89},[72,625,394],{"class":93},[72,627,628],{"class":296},"length",[72,630,631],{"class":300}," \u003C",[72,633,634],{"class":237}," 2",[72,636,637],{"class":100},") ",[72,639,640],{"class":78},"return",[72,642,643],{"class":100}," []\n",[72,645,646,648,650,652,654,656],{"class":74,"line":199},[72,647,335],{"class":78},[72,649,338],{"class":78},[72,651,297],{"class":85},[72,653,90],{"class":100},[72,655,583],{"class":89},[72,657,274],{"class":100},[72,659,660,662],{"class":74,"line":215},[72,661,271],{"class":93},[72,663,274],{"class":89},[57,665,666,667,670],{},"The route is a GET, and visitor routes check reads too. Another website cannot use its visitors' browsers to query your API, and a URL like ",[69,668,669],{},"\u002Fapi\u002Fsearch?q=…"," pasted into the address bar answers 403.",[57,672,673,674,677],{},"Cache the paid call in a server function, not the route: the route's response carries ",[69,675,676],{},"Cache-Control: private, no-store",", and Nitro's route cache would hide the request headers the guard checks.",[679,680,681],"style",{},"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 pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}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 .sZUrc, html code.shiki .sZUrc{--shiki-light:#E53935;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}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 .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}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 .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 .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":67,"searchDepth":97,"depth":97,"links":683},[],"Keep other sites and scripts from spending your API quota through your BFF.","md",{},"\u002Fexamples\u002Fpaid-api-proxy",{"title":52,"description":684},"examples\u002Fpaid-api-proxy",[691,692,693],"access: 'visitor'","rateLimiter","defineCachedFunction","yvaXsqfSXHgwMfmvC5QnxNVkYKpRfyvClnnJ2Nmnze4",[696,700],{"path":697,"title":698,"description":699,"category":155,"order":75},"\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.",{"path":701,"title":702,"description":703,"category":155,"order":137},"\u002Fexamples\u002Fclient-data","JSON for client-side pages","Data that your pages fetch in the browser, kept from being embedded by other sites.",[705,708,710,714,719,726,734,742,749,757,765,772,780,787,793,800,808,814,822,828,836,842,848,853,860],{"path":697,"title":698,"description":699,"category":155,"order":75,"uses":706},[691,707,126],"@nuxtjs\u002Fturnstile",{"path":687,"title":52,"description":684,"category":155,"order":97,"uses":709},[691,692,693],{"path":701,"title":702,"description":703,"category":155,"order":137,"uses":711},[691,712,713],"access: 'public'","useFetch",{"path":715,"title":716,"description":717,"category":155,"order":163,"uses":718},"\u002Fexamples\u002Fmember-site-contact","Visitor routes inside a member app","Keep 'user' as the default and open a few routes to visitors without accounts.",[691,14],{"path":720,"title":721,"description":722,"category":723,"order":75,"uses":724},"\u002Fexamples\u002Fnuxt-auth-utils","nuxt-auth-utils","Use the sealed Cookie session of nuxt-auth-utils as the user check.","auth",[721,725],"requireUserSession",{"path":727,"title":728,"description":729,"category":723,"order":97,"uses":730},"\u002Fexamples\u002Fsidebase-nuxt-auth","Auth.js with @sidebase\u002Fnuxt-auth","Check the Auth.js session, and accept the same JWT as a Bearer token.",[731,732,733],"@sidebase\u002Fnuxt-auth","getServerSession","getToken",{"path":735,"title":736,"description":737,"category":723,"order":137,"uses":738},"\u002Fexamples\u002Fsupabase","Supabase","Verify the Supabase session with getClaims, and tell bad tokens from outages.",[739,740,741],"@nuxtjs\u002Fsupabase","getClaims","isAuthRetryableFetchError",{"path":743,"title":744,"description":745,"category":723,"order":163,"uses":746},"\u002Fexamples\u002Fclerk","Clerk","Read the auth object that Clerk's middleware put on the event.",[747,748],"@clerk\u002Fnuxt","event.context.auth",{"path":750,"title":751,"description":752,"category":723,"order":188,"uses":753},"\u002Fexamples\u002Ffirebase","Firebase Authentication","Session Cookies for the browser, ID tokens for apps, and error codes mapped to 401 or 503.",[754,755,756],"firebase-admin","verifySessionCookie","verifyIdToken",{"path":758,"title":759,"description":760,"category":723,"order":199,"uses":761},"\u002Fexamples\u002Fjwt-jose","Any OpenID Connect provider (JWT)","Verify access tokens from Auth0, Keycloak, Cognito, Entra ID and others with jose.",[762,763,764],"jose","jwtVerify","createRemoteJWKSet",{"path":766,"title":767,"description":768,"category":769,"order":75,"uses":770},"\u002Fexamples\u002Fnuxt-security-rate-limit","Rate limits with nuxt-security","Slow down credential stuffing and token guessing before verifyUser runs.","security",[126,692,771],"routeRules",{"path":773,"title":774,"description":775,"category":769,"order":97,"uses":776},"\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.",[126,777,778,779],"headers","requestSizeLimiter","allowedMethodsRestricter",{"path":781,"title":782,"description":783,"category":769,"order":137,"uses":784},"\u002Fexamples\u002Fnuxt-csurf","CSRF tokens with nuxt-csurf","Add a synchronizer token on top of the origin check, without breaking Bearer clients.",[785,786,771],"nuxt-csurf","useCsrfFetch",{"path":788,"title":789,"description":790,"category":769,"order":163,"uses":791},"\u002Fexamples\u002Fturnstile","Bot checks on public routes with Turnstile","Public sign-in and sign-up routes skip verifyUser, so give them their own check.",[707,792],"verifyTurnstileToken",{"path":794,"title":795,"description":796,"category":769,"order":188,"uses":797},"\u002Fexamples\u002Fcors-bearer-clients","A frontend on another origin","CORS with nuxt-security for a separate app that calls the BFF with Bearer tokens.",[126,798,799],"corsHandler","viaBearer",{"path":801,"title":802,"description":803,"category":804,"order":75,"uses":805},"\u002Fexamples\u002Frecord-authorization","Per-record authorization","The guard says who the user is. The handler decides what they may touch.","patterns",[806,807],"event.context","createError",{"path":809,"title":810,"description":811,"category":804,"order":97,"uses":812},"\u002Fexamples\u002Froles","Roles and app-wide access","Reject whole groups of users in verifyUser, and check roles per route.",[14,813],"403",{"path":815,"title":816,"description":817,"category":804,"order":137,"uses":818},"\u002Fexamples\u002Fupstream-proxy","Calling an upstream API","Attach the user's token after the guard, never in middleware or routeRules.proxy.",[819,820,821],"$fetch","routeRules.proxy","server\u002Futils",{"path":823,"title":824,"description":825,"category":804,"order":163,"uses":826},"\u002Fexamples\u002Fssr-and-server-functions","SSR and server functions","Call your own API during server rendering, or skip HTTP entirely.",[713,827,821],"useRequestFetch",{"path":829,"title":830,"description":831,"category":804,"order":188,"uses":832},"\u002Fexamples\u002Fwebhooks","Webhooks","Server-to-server callbacks belong outside server\u002Fapi, with their own signature check.",[833,834,835],"server\u002Froutes","readRawBody","xssValidator",{"path":837,"title":838,"description":839,"category":804,"order":199,"uses":840},"\u002Fexamples\u002Fbearer-clients","Mobile apps and CLI tools","One BFF for the browser and for clients that send Bearer tokens.",[799,841],"Authorization",{"path":843,"title":844,"description":845,"category":804,"order":215,"uses":846},"\u002Fexamples\u002Fmore-route-folders","Checking more folders at build time","Extend routePatterns to server\u002Froutes and layers.",[847],"routePatterns",{"path":849,"title":850,"description":851,"category":804,"order":256,"uses":852},"\u002Fexamples\u002Fpublic-cache","Caching public data","Cache what is the same for everyone on a separate public route.",[693,712],{"path":854,"title":855,"description":856,"category":804,"order":262,"uses":857},"\u002Fexamples\u002Fclient-errors","Handling 401, 403 and 503 in the app","Sign out on 401, explain 403, retry on 503.",[858,859],"$fetch.create","onResponseError",{"path":861,"title":862,"description":863,"category":804,"order":268,"uses":864},"\u002Fexamples\u002Ftesting","Testing the protection","An end-to-end test that every protected route refuses anonymous calls.",[865,866],"@nuxt\u002Ftest-utils","vitest",1796451483527,"a99f93bd-e267-45a7-90df-9194cd77468d"]