[{"data":1,"prerenderedAt":1491},["Reactive",2],{"/posts/cloudflare-turnstile-nestjs":3,"/posts/cloudflare-turnstile-nestjs:related":1381,"/posts/cloudflare-turnstile-nestjs:alternate":1490},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"thumbnail":10,"date":11,"read":12,"body":13,"_type":1375,"_id":1376,"_source":1377,"_file":1378,"_extension":1379,"sitemap":1380},"/posts/cloudflare-turnstile-nestjs","posts",false,"","Adding Cloudflare Turnstile to NestJS with a captcha guard","Add Cloudflare Turnstile to a NestJS app: render the widget, verify the token in a guard with one decorator, use test keys, and compare it with reCAPTCHA.","/media/cloudflare-turnstile-nestjs/thumbnail.png","2026-11-24","9 min",{"type":14,"children":15,"toc":1352},"root",[16,27,33,49,56,64,127,132,138,159,187,199,204,210,219,224,235,256,265,278,284,304,315,323,343,354,376,382,395,404,469,475,480,489,499,504,513,522,535,544,556,565,578,584,589,591,704,706,794,807,815,834,840,845,854,867,876,885,890,896,908,917,926,938,944,949,958,963,972,1004,1010,1012,1125,1130,1136,1149,1197,1218,1224,1231,1236,1242,1247,1253,1265,1271,1283,1289,1323],{"type":17,"tag":18,"props":19,"children":20},"element","p",{},[21],{"type":17,"tag":22,"props":23,"children":26},"img",{"alt":24,"src":25},"nest-cloudflare-turnstile: one decorator for Cloudflare Turnstile verification in a NestJS guard","/media/cloudflare-turnstile-nestjs/thumbnail.webp",[],{"type":17,"tag":18,"props":28,"children":29},{},[30],{"type":31,"value":32},"text","Cloudflare Turnstile is a captcha that most visitors never have to click. The browser solves a challenge in the background, the widget hands your form a token, and your server asks Cloudflare whether that token is real. The server half is the part people get wrong: they check the token in one controller, forget it in the next, or skip the hostname check.",{"type":17,"tag":18,"props":34,"children":35},{},[36,38,47],{"type":31,"value":37},"In NestJS that check belongs in a guard, so it runs before any handler and lives in one place. I maintain ",{"type":17,"tag":39,"props":40,"children":44},"a",{"href":41,"rel":42},"https://github.com/halitsever/nest-cloudflare-turnstile",[43],"noopener",[45],{"type":31,"value":46},"nest-cloudflare-turnstile",{"type":31,"value":48},", a module that does exactly that. This post walks through adding Turnstile to a NestJS app with it, from the Cloudflare dashboard to tests. Every response below is real output from the module's example app.",{"type":17,"tag":50,"props":51,"children":53},"h2",{"id":52},"how-the-turnstile-token-flow-works",[54],{"type":31,"value":55},"How the Turnstile token flow works",{"type":17,"tag":18,"props":57,"children":58},{},[59],{"type":17,"tag":22,"props":60,"children":63},{"alt":61,"src":62},"The browser sends the Turnstile token to the NestJS guard, the guard asks Cloudflare siteverify, then either the controller runs or the request gets a 400","/media/cloudflare-turnstile-nestjs/request-flow.webp",[],{"type":17,"tag":65,"props":66,"children":67},"ol",{},[68,83,88,93,122],{"type":17,"tag":69,"props":70,"children":71},"li",{},[72,74,81],{"type":31,"value":73},"The Turnstile widget on your page runs a challenge and puts a token into a hidden form field called ",{"type":17,"tag":75,"props":76,"children":78},"code",{"className":77},[],[79],{"type":31,"value":80},"cf-turnstile-response",{"type":31,"value":82},".",{"type":17,"tag":69,"props":84,"children":85},{},[86],{"type":31,"value":87},"Your NestJS route receives the token, in that form field or in a header with the same name.",{"type":17,"tag":69,"props":89,"children":90},{},[91],{"type":31,"value":92},"The guard sends the token and your secret key to Cloudflare's siteverify endpoint.",{"type":17,"tag":69,"props":94,"children":95},{},[96,98,104,106,112,114,120],{"type":31,"value":97},"Cloudflare answers with ",{"type":17,"tag":75,"props":99,"children":101},{"className":100},[],[102],{"type":31,"value":103},"success",{"type":31,"value":105},", the ",{"type":17,"tag":75,"props":107,"children":109},{"className":108},[],[110],{"type":31,"value":111},"hostname",{"type":31,"value":113}," the widget ran on and the ",{"type":17,"tag":75,"props":115,"children":117},{"className":116},[],[118],{"type":31,"value":119},"action",{"type":31,"value":121}," it was given. Each token works once and expires after five minutes.",{"type":17,"tag":69,"props":123,"children":124},{},[125],{"type":31,"value":126},"If Cloudflare accepted the token, your controller runs. If not, the request stops with a 400.",{"type":17,"tag":18,"props":128,"children":129},{},[130],{"type":31,"value":131},"The rule that matters: the widget on its own protects nothing. A bot can skip your page and post straight to the API. Only the server-side check in step 3 stops it.",{"type":17,"tag":50,"props":133,"children":135},{"id":134},"step-1-create-a-turnstile-widget-in-cloudflare",[136],{"type":31,"value":137},"Step 1: create a Turnstile widget in Cloudflare",{"type":17,"tag":18,"props":139,"children":140},{},[141,143,149,151,157],{"type":31,"value":142},"In the Cloudflare dashboard, open Turnstile and add a widget. Give it the hostnames it will run on (for example ",{"type":17,"tag":75,"props":144,"children":146},{"className":145},[],[147],{"type":31,"value":148},"example.com",{"type":31,"value":150}," and ",{"type":17,"tag":75,"props":152,"children":154},{"className":153},[],[155],{"type":31,"value":156},"localhost",{"type":31,"value":158}," for development) and pick a widget mode. Cloudflare gives you two keys:",{"type":17,"tag":160,"props":161,"children":162},"ul",{},[163,176],{"type":17,"tag":69,"props":164,"children":165},{},[166,168,174],{"type":31,"value":167},"a ",{"type":17,"tag":169,"props":170,"children":171},"strong",{},[172],{"type":31,"value":173},"site key",{"type":31,"value":175},", which is public and goes into your HTML",{"type":17,"tag":69,"props":177,"children":178},{},[179,180,185],{"type":31,"value":167},{"type":17,"tag":169,"props":181,"children":182},{},[183],{"type":31,"value":184},"secret key",{"type":31,"value":186},", which stays on the server and goes into an environment variable",{"type":17,"tag":188,"props":189,"children":194},"pre",{"className":190,"code":192,"language":193,"meta":7},[191],"language-bash","TURNSTILE_SECRET_KEY=0x4AAAAAAA...\n","bash",[195],{"type":17,"tag":75,"props":196,"children":197},{"__ignoreMap":7},[198],{"type":31,"value":192},{"type":17,"tag":18,"props":200,"children":201},{},[202],{"type":31,"value":203},"You don't need a widget to follow along. Cloudflare publishes test keys, covered further down, and the examples here use them.",{"type":17,"tag":50,"props":205,"children":207},{"id":206},"step-2-install-nest-cloudflare-turnstile",[208],{"type":31,"value":209},"Step 2: install nest-cloudflare-turnstile",{"type":17,"tag":188,"props":211,"children":214},{"className":212,"code":213,"language":193,"meta":7},[191],"npm install nest-cloudflare-turnstile\n",[215],{"type":17,"tag":75,"props":216,"children":217},{"__ignoreMap":7},[218],{"type":31,"value":213},{"type":17,"tag":18,"props":220,"children":221},{},[222],{"type":31,"value":223},"The module works with NestJS 10, 11 and 12, on Express or Fastify, and has no runtime dependencies besides Nest. It needs Node.js 20 or later. Register it once with your secret key:",{"type":17,"tag":188,"props":225,"children":230},{"className":226,"code":228,"language":229,"meta":7},[227],"language-ts","import { Module } from '@nestjs/common';\nimport { TurnstileModule } from 'nest-cloudflare-turnstile';\n\n@Module({\n  imports: [\n    TurnstileModule.forRoot({\n      secretKey: process.env.TURNSTILE_SECRET_KEY,\n    }),\n  ],\n})\nexport class AppModule {}\n","ts",[231],{"type":17,"tag":75,"props":232,"children":233},{"__ignoreMap":7},[234],{"type":31,"value":228},{"type":17,"tag":18,"props":236,"children":237},{},[238,240,246,248,254],{"type":31,"value":239},"If your config comes from ",{"type":17,"tag":75,"props":241,"children":243},{"className":242},[],[244],{"type":31,"value":245},"@nestjs/config",{"type":31,"value":247},", use ",{"type":17,"tag":75,"props":249,"children":251},{"className":250},[],[252],{"type":31,"value":253},"forRootAsync",{"type":31,"value":255},":",{"type":17,"tag":188,"props":257,"children":260},{"className":258,"code":259,"language":229,"meta":7},[227],"import { ConfigModule, ConfigService } from '@nestjs/config';\nimport { TurnstileModule } from 'nest-cloudflare-turnstile';\n\nTurnstileModule.forRootAsync({\n  imports: [ConfigModule],\n  inject: [ConfigService],\n  useFactory: (config: ConfigService) => ({\n    secretKey: config.getOrThrow\u003Cstring>('TURNSTILE_SECRET_KEY'),\n  }),\n});\n",[261],{"type":17,"tag":75,"props":262,"children":263},{"__ignoreMap":7},[264],{"type":31,"value":259},{"type":17,"tag":18,"props":266,"children":267},{},[268,270,276],{"type":31,"value":269},"The module is global, so feature modules can use the guard without importing it again. The app refuses to start with an empty ",{"type":17,"tag":75,"props":271,"children":273},{"className":272},[],[274],{"type":31,"value":275},"secretKey",{"type":31,"value":277},", which is better than finding out in production that every request is let through.",{"type":17,"tag":50,"props":279,"children":281},{"id":280},"step-3-render-the-turnstile-widget",[282],{"type":31,"value":283},"Step 3: render the Turnstile widget",{"type":17,"tag":18,"props":285,"children":286},{},[287,289,295,297,302],{"type":31,"value":288},"In a plain HTML form, load Cloudflare's script and drop in a ",{"type":17,"tag":75,"props":290,"children":292},{"className":291},[],[293],{"type":31,"value":294},"div",{"type":31,"value":296}," with your site key. The widget adds the hidden ",{"type":17,"tag":75,"props":298,"children":300},{"className":299},[],[301],{"type":31,"value":80},{"type":31,"value":303}," field to the form by itself:",{"type":17,"tag":188,"props":305,"children":310},{"className":306,"code":308,"language":309,"meta":7},[307],"language-html","\u003Cscript\n  src=\"https://challenges.cloudflare.com/turnstile/v0/api.js\"\n  async\n  defer\n>\u003C/script>\n\n\u003Cform action=\"/contact\" method=\"POST\">\n  \u003Ctextarea name=\"message\">\u003C/textarea>\n  \u003Cdiv class=\"cf-turnstile\" data-sitekey=\"YOUR_SITE_KEY\">\u003C/div>\n  \u003Cbutton type=\"submit\">Send\u003C/button>\n\u003C/form>\n","html",[311],{"type":17,"tag":75,"props":312,"children":313},{"__ignoreMap":7},[314],{"type":31,"value":308},{"type":17,"tag":18,"props":316,"children":317},{},[318],{"type":17,"tag":22,"props":319,"children":322},{"alt":320,"src":321},"A contact form with the Cloudflare Turnstile widget showing Success, using Cloudflare's always-passes test site key","/media/cloudflare-turnstile-nestjs/widget-test-key-passes.webp",[],{"type":17,"tag":18,"props":324,"children":325},{},[326,328,333,335,342],{"type":31,"value":327},"With a frontend framework, read the token from the Turnstile component and send it in the ",{"type":17,"tag":75,"props":329,"children":331},{"className":330},[],[332],{"type":31,"value":80},{"type":31,"value":334}," header, which the guard also reads. In React with ",{"type":17,"tag":39,"props":336,"children":339},{"href":337,"rel":338},"https://github.com/marsidev/react-turnstile",[43],[340],{"type":31,"value":341},"@marsidev/react-turnstile",{"type":31,"value":255},{"type":17,"tag":188,"props":344,"children":349},{"className":345,"code":347,"language":348,"meta":7},[346],"language-tsx","import { Turnstile } from '@marsidev/react-turnstile';\nimport type { TurnstileInstance } from '@marsidev/react-turnstile';\nimport { useRef, type FormEvent } from 'react';\n\nexport function LoginForm() {\n  const turnstile = useRef\u003CTurnstileInstance | null>(null);\n\n  async function handleSubmit(event: FormEvent\u003CHTMLFormElement>) {\n    event.preventDefault();\n    const form = new FormData(event.currentTarget);\n    await fetch('/auth/login', {\n      method: 'POST',\n      headers: {\n        'content-type': 'application/json',\n        'cf-turnstile-response': turnstile.current?.getResponse() ?? '',\n      },\n      body: JSON.stringify({ email: form.get('email') }),\n    });\n    turnstile.current?.reset();\n  }\n\n  return (\n    \u003Cform onSubmit={handleSubmit}>\n      \u003Cinput name=\"email\" type=\"email\" />\n      \u003CTurnstile ref={turnstile} siteKey=\"YOUR_SITE_KEY\" />\n      \u003Cbutton type=\"submit\">Log in\u003C/button>\n    \u003C/form>\n  );\n}\n","tsx",[350],{"type":17,"tag":75,"props":351,"children":352},{"__ignoreMap":7},[353],{"type":31,"value":347},{"type":17,"tag":18,"props":355,"children":356},{},[357,359,365,367,374],{"type":31,"value":358},"Note the ",{"type":17,"tag":75,"props":360,"children":362},{"className":361},[],[363],{"type":31,"value":364},"reset()",{"type":31,"value":366}," at the end. Cloudflare accepts each token once, so the widget needs a fresh one before the next request. The module's ",{"type":17,"tag":39,"props":368,"children":371},{"href":369,"rel":370},"https://halitsever.github.io/nest-cloudflare-turnstile/frontend",[43],[372],{"type":31,"value":373},"frontend guide",{"type":31,"value":375}," has the same example for Next.js Server Actions, Vue and Angular.",{"type":17,"tag":50,"props":377,"children":379},{"id":378},"step-4-protect-a-nestjs-route-with-the-guard",[380],{"type":31,"value":381},"Step 4: protect a NestJS route with the guard",{"type":17,"tag":18,"props":383,"children":384},{},[385,387,393],{"type":31,"value":386},"Put ",{"type":17,"tag":75,"props":388,"children":390},{"className":389},[],[391],{"type":31,"value":392},"@TurnstileCaptcha()",{"type":31,"value":394}," on a route, or on a whole controller:",{"type":17,"tag":188,"props":396,"children":399},{"className":397,"code":398,"language":229,"meta":7},[227],"import { Body, Controller, Post } from '@nestjs/common';\nimport { TurnstileCaptcha, TurnstileResult } from 'nest-cloudflare-turnstile';\nimport type { TurnstileVerifyResponse } from 'nest-cloudflare-turnstile';\n\n@Controller('contact')\nexport class ContactController {\n  @Post()\n  @TurnstileCaptcha()\n  send(\n    @Body() body: { message?: string },\n    @TurnstileResult() result: TurnstileVerifyResponse,\n  ) {\n    return { message: body.message, solvedOn: result.hostname };\n  }\n}\n",[400],{"type":17,"tag":75,"props":401,"children":402},{"__ignoreMap":7},[403],{"type":31,"value":398},{"type":17,"tag":18,"props":405,"children":406},{},[407,409,415,417,422,424,429,430,436,438,444,446,452,454,460,461,467],{"type":31,"value":408},"The handler only runs after Cloudflare accepted the token. ",{"type":17,"tag":75,"props":410,"children":412},{"className":411},[],[413],{"type":31,"value":414},"@TurnstileResult()",{"type":31,"value":416}," gives you what Cloudflare returned, including ",{"type":17,"tag":75,"props":418,"children":420},{"className":419},[],[421],{"type":31,"value":111},{"type":31,"value":423},", ",{"type":17,"tag":75,"props":425,"children":427},{"className":426},[],[428],{"type":31,"value":119},{"type":31,"value":150},{"type":17,"tag":75,"props":431,"children":433},{"className":432},[],[434],{"type":31,"value":435},"cdata",{"type":31,"value":437},". Import ",{"type":17,"tag":75,"props":439,"children":441},{"className":440},[],[442],{"type":31,"value":443},"TurnstileVerifyResponse",{"type":31,"value":445}," with ",{"type":17,"tag":75,"props":447,"children":449},{"className":448},[],[450],{"type":31,"value":451},"import type",{"type":31,"value":453},": with ",{"type":17,"tag":75,"props":455,"children":457},{"className":456},[],[458],{"type":31,"value":459},"isolatedModules",{"type":31,"value":150},{"type":17,"tag":75,"props":462,"children":464},{"className":463},[],[465],{"type":31,"value":466},"emitDecoratorMetadata",{"type":31,"value":468}," both on, TypeScript requires it for interfaces in decorated parameters.",{"type":17,"tag":50,"props":470,"children":472},{"id":471},"what-the-guard-returns",[473],{"type":31,"value":474},"What the guard returns",{"type":17,"tag":18,"props":476,"children":477},{},[478],{"type":31,"value":479},"These come from running the example app with Cloudflare's always-passes test secret. A request with no token stops at the guard:",{"type":17,"tag":188,"props":481,"children":484},{"className":482,"code":483,"language":193,"meta":7},[191],"curl -i -X POST localhost:3000/contact \\\n  -H 'content-type: application/json' \\\n  -d '{\"message\":\"hi\"}'\n",[485],{"type":17,"tag":75,"props":486,"children":487},{"__ignoreMap":7},[488],{"type":31,"value":483},{"type":17,"tag":188,"props":490,"children":494},{"className":491,"code":493,"language":31,"meta":7},[492],"language-text","HTTP/1.1 400 Bad Request\n{\"message\":\"Missing turnstile verification code.\",\"error\":\"Bad Request\",\"statusCode\":400}\n",[495],{"type":17,"tag":75,"props":496,"children":497},{"__ignoreMap":7},[498],{"type":31,"value":493},{"type":17,"tag":18,"props":500,"children":501},{},[502],{"type":31,"value":503},"With a token in the body, the controller runs:",{"type":17,"tag":188,"props":505,"children":508},{"className":506,"code":507,"language":193,"meta":7},[191],"curl -i -X POST localhost:3000/contact \\\n  -H 'content-type: application/json' \\\n  -d '{\"message\":\"hi\",\"cf-turnstile-response\":\"XXXX.DUMMY.TOKEN.XXXX\"}'\n",[509],{"type":17,"tag":75,"props":510,"children":511},{"__ignoreMap":7},[512],{"type":31,"value":507},{"type":17,"tag":188,"props":514,"children":517},{"className":515,"code":516,"language":31,"meta":7},[492],"HTTP/1.1 201 Created\n{\"message\":\"hi\",\"solvedOn\":\"example.com\"}\n",[518],{"type":17,"tag":75,"props":519,"children":520},{"__ignoreMap":7},[521],{"type":31,"value":516},{"type":17,"tag":18,"props":523,"children":524},{},[525,527,533],{"type":31,"value":526},"The token works in a header too (",{"type":17,"tag":75,"props":528,"children":530},{"className":529},[],[531],{"type":31,"value":532},"-H 'cf-turnstile-response: XXXX.DUMMY.TOKEN.XXXX'",{"type":31,"value":534},") with the same result. When Cloudflare rejects the token, the guard answers with a different message:",{"type":17,"tag":188,"props":536,"children":539},{"className":537,"code":538,"language":31,"meta":7},[492],"HTTP/1.1 400 Bad Request\n{\"message\":\"Invalid turnstile verification code.\",\"error\":\"Bad Request\",\"statusCode\":400}\n",[540],{"type":17,"tag":75,"props":541,"children":542},{"__ignoreMap":7},[543],{"type":31,"value":538},{"type":17,"tag":18,"props":545,"children":546},{},[547,549,555],{"type":31,"value":548},"To return a 401 or 403 instead, or your own message, pass ",{"type":17,"tag":75,"props":550,"children":552},{"className":551},[],[553],{"type":31,"value":554},"exceptionFactory",{"type":31,"value":255},{"type":17,"tag":188,"props":557,"children":560},{"className":558,"code":559,"language":229,"meta":7},[227],"import { ForbiddenException } from '@nestjs/common';\n\nTurnstileModule.forRoot({\n  secretKey: process.env.TURNSTILE_SECRET_KEY,\n  exceptionFactory: (reason, { errorCodes }) =>\n    new ForbiddenException({\n      message:\n        reason === 'missing'\n          ? 'Please complete the challenge.'\n          : 'The challenge expired, please try again.',\n      errorCodes,\n    }),\n});\n",[561],{"type":17,"tag":75,"props":562,"children":563},{"__ignoreMap":7},[564],{"type":31,"value":559},{"type":17,"tag":18,"props":566,"children":567},{},[568,570,576],{"type":31,"value":569},"Problems on your side, such as a wrong secret key or Cloudflare being unreachable, are a different case. They return a 500 and reach the ",{"type":17,"tag":75,"props":571,"children":573},{"className":572},[],[574],{"type":31,"value":575},"onError",{"type":31,"value":577}," hook, so you can log them without mixing them up with bots. The module retries siteverify once when it fails, and its errors never contain your secret key.",{"type":17,"tag":50,"props":579,"children":581},{"id":580},"cloudflare-turnstile-test-keys",[582],{"type":31,"value":583},"Cloudflare Turnstile test keys",{"type":17,"tag":18,"props":585,"children":586},{},[587],{"type":31,"value":588},"Cloudflare publishes keys that skip the real challenge. Pair a test site key in the browser with a test secret key on the server:",{"type":31,"value":590},"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",{"type":17,"tag":592,"props":593,"children":594},"table",{},[595,614],{"type":17,"tag":596,"props":597,"children":598},"thead",{},[599],{"type":17,"tag":600,"props":601,"children":602},"tr",{},[603,609],{"type":17,"tag":604,"props":605,"children":606},"th",{},[607],{"type":31,"value":608},"Site key",{"type":17,"tag":604,"props":610,"children":611},{},[612],{"type":31,"value":613},"Widget behavior",{"type":17,"tag":615,"props":616,"children":617},"tbody",{},[618,636,653,670,687],{"type":17,"tag":600,"props":619,"children":620},{},[621,631],{"type":17,"tag":622,"props":623,"children":624},"td",{},[625],{"type":17,"tag":75,"props":626,"children":628},{"className":627},[],[629],{"type":31,"value":630},"1x00000000000000000000AA",{"type":17,"tag":622,"props":632,"children":633},{},[634],{"type":31,"value":635},"Always passes, visible",{"type":17,"tag":600,"props":637,"children":638},{},[639,648],{"type":17,"tag":622,"props":640,"children":641},{},[642],{"type":17,"tag":75,"props":643,"children":645},{"className":644},[],[646],{"type":31,"value":647},"2x00000000000000000000AB",{"type":17,"tag":622,"props":649,"children":650},{},[651],{"type":31,"value":652},"Always fails, visible",{"type":17,"tag":600,"props":654,"children":655},{},[656,665],{"type":17,"tag":622,"props":657,"children":658},{},[659],{"type":17,"tag":75,"props":660,"children":662},{"className":661},[],[663],{"type":31,"value":664},"1x00000000000000000000BB",{"type":17,"tag":622,"props":666,"children":667},{},[668],{"type":31,"value":669},"Always passes, invisible",{"type":17,"tag":600,"props":671,"children":672},{},[673,682],{"type":17,"tag":622,"props":674,"children":675},{},[676],{"type":17,"tag":75,"props":677,"children":679},{"className":678},[],[680],{"type":31,"value":681},"2x00000000000000000000BB",{"type":17,"tag":622,"props":683,"children":684},{},[685],{"type":31,"value":686},"Always fails, invisible",{"type":17,"tag":600,"props":688,"children":689},{},[690,699],{"type":17,"tag":622,"props":691,"children":692},{},[693],{"type":17,"tag":75,"props":694,"children":696},{"className":695},[],[697],{"type":31,"value":698},"3x00000000000000000000FF",{"type":17,"tag":622,"props":700,"children":701},{},[702],{"type":31,"value":703},"Forces an interactive challenge",{"type":31,"value":705},"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",{"type":17,"tag":592,"props":707,"children":708},{},[709,725],{"type":17,"tag":596,"props":710,"children":711},{},[712],{"type":17,"tag":600,"props":713,"children":714},{},[715,720],{"type":17,"tag":604,"props":716,"children":717},{},[718],{"type":31,"value":719},"Secret key",{"type":17,"tag":604,"props":721,"children":722},{},[723],{"type":31,"value":724},"Siteverify answer",{"type":17,"tag":615,"props":726,"children":727},{},[728,745,770],{"type":17,"tag":600,"props":729,"children":730},{},[731,740],{"type":17,"tag":622,"props":732,"children":733},{},[734],{"type":17,"tag":75,"props":735,"children":737},{"className":736},[],[738],{"type":31,"value":739},"1x0000000000000000000000000000000AA",{"type":17,"tag":622,"props":741,"children":742},{},[743],{"type":31,"value":744},"Always passes",{"type":17,"tag":600,"props":746,"children":747},{},[748,757],{"type":17,"tag":622,"props":749,"children":750},{},[751],{"type":17,"tag":75,"props":752,"children":754},{"className":753},[],[755],{"type":31,"value":756},"2x0000000000000000000000000000000AA",{"type":17,"tag":622,"props":758,"children":759},{},[760,762,768],{"type":31,"value":761},"Always fails (",{"type":17,"tag":75,"props":763,"children":765},{"className":764},[],[766],{"type":31,"value":767},"invalid-input-response",{"type":31,"value":769},")",{"type":17,"tag":600,"props":771,"children":772},{},[773,782],{"type":17,"tag":622,"props":774,"children":775},{},[776],{"type":17,"tag":75,"props":777,"children":779},{"className":778},[],[780],{"type":31,"value":781},"3x0000000000000000000000000000000AA",{"type":17,"tag":622,"props":783,"children":784},{},[785,787,793],{"type":31,"value":786},"Token already spent (",{"type":17,"tag":75,"props":788,"children":790},{"className":789},[],[791],{"type":31,"value":792},"timeout-or-duplicate",{"type":31,"value":769},{"type":17,"tag":18,"props":795,"children":796},{},[797,799,805],{"type":31,"value":798},"Test site keys produce the dummy token ",{"type":17,"tag":75,"props":800,"children":802},{"className":801},[],[803],{"type":31,"value":804},"XXXX.DUMMY.TOKEN.XXXX",{"type":31,"value":806},", which only test secret keys accept. That is the token in the curl examples above. Here is the always-fails site key in the same form:",{"type":17,"tag":18,"props":808,"children":809},{},[810],{"type":17,"tag":22,"props":811,"children":814},{"alt":812,"src":813},"The Turnstile widget showing Verification failed with Cloudflare's always-fails test site key","/media/cloudflare-turnstile-nestjs/widget-test-key-fails.webp",[],{"type":17,"tag":18,"props":816,"children":817},{},[818,820,825,827,833],{"type":31,"value":819},"One warning: ",{"type":17,"tag":75,"props":821,"children":823},{"className":822},[],[824],{"type":31,"value":739},{"type":31,"value":826}," lets every request with a token through. If it ends up in production by mistake, nothing is protected, so the module logs a warning when it runs with that key and ",{"type":17,"tag":75,"props":828,"children":830},{"className":829},[],[831],{"type":31,"value":832},"NODE_ENV=production",{"type":31,"value":82},{"type":17,"tag":50,"props":835,"children":837},{"id":836},"check-the-hostname-and-the-action",[838],{"type":31,"value":839},"Check the hostname and the action",{"type":17,"tag":18,"props":841,"children":842},{},[843],{"type":31,"value":844},"A token proves that someone solved a challenge, but not on which site. Cloudflare recommends checking that the hostname matches yours, so tokens solved on another site that uses the same widget can't be replayed against your API:",{"type":17,"tag":188,"props":846,"children":849},{"className":847,"code":848,"language":229,"meta":7},[227],"TurnstileModule.forRoot({\n  secretKey: process.env.TURNSTILE_SECRET_KEY,\n  expectedHostname: ['example.com', 'www.example.com'],\n});\n",[850],{"type":17,"tag":75,"props":851,"children":852},{"__ignoreMap":7},[853],{"type":31,"value":848},{"type":17,"tag":18,"props":855,"children":856},{},[857,859,865],{"type":31,"value":858},"Actions go one step further. Give each widget a ",{"type":17,"tag":75,"props":860,"children":862},{"className":861},[],[863],{"type":31,"value":864},"data-action",{"type":31,"value":866},", then tell each route which action it accepts, so a token from the newsletter form can't open the login route:",{"type":17,"tag":188,"props":868,"children":871},{"className":869,"code":870,"language":309,"meta":7},[307],"\u003Cdiv class=\"cf-turnstile\" data-sitekey=\"YOUR_SITE_KEY\" data-action=\"login\">\u003C/div>\n",[872],{"type":17,"tag":75,"props":873,"children":874},{"__ignoreMap":7},[875],{"type":31,"value":870},{"type":17,"tag":188,"props":877,"children":880},{"className":878,"code":879,"language":229,"meta":7},[227],"@Controller('auth')\n@TurnstileCaptcha({ action: ['login', 'signup'] })\nexport class AuthController {\n  @Post('login')\n  @TurnstileCaptcha({ action: 'login' })\n  login() {}\n\n  @Post('signup')\n  signup() {}\n}\n",[881],{"type":17,"tag":75,"props":882,"children":883},{"__ignoreMap":7},[884],{"type":31,"value":879},{"type":17,"tag":18,"props":886,"children":887},{},[888],{"type":31,"value":889},"The route's action wins over the controller's, and the token is still checked only once per request.",{"type":17,"tag":50,"props":891,"children":893},{"id":892},"protect-every-route-with-a-global-guard",[894],{"type":31,"value":895},"Protect every route with a global guard",{"type":17,"tag":18,"props":897,"children":898},{},[899,901,907],{"type":31,"value":900},"For an API where almost everything should require a token, register the guard globally and exempt the few open routes, like health checks, with ",{"type":17,"tag":75,"props":902,"children":904},{"className":903},[],[905],{"type":31,"value":906},"@SkipTurnstile()",{"type":31,"value":255},{"type":17,"tag":188,"props":909,"children":912},{"className":910,"code":911,"language":229,"meta":7},[227],"import { Module } from '@nestjs/common';\nimport { APP_GUARD } from '@nestjs/core';\nimport { TurnstileGuard, TurnstileModule } from 'nest-cloudflare-turnstile';\n\n@Module({\n  imports: [\n    TurnstileModule.forRoot({ secretKey: process.env.TURNSTILE_SECRET_KEY }),\n  ],\n  providers: [{ provide: APP_GUARD, useClass: TurnstileGuard }],\n})\nexport class AppModule {}\n",[913],{"type":17,"tag":75,"props":914,"children":915},{"__ignoreMap":7},[916],{"type":31,"value":911},{"type":17,"tag":188,"props":918,"children":921},{"className":919,"code":920,"language":229,"meta":7},[227],"import { Controller, Get } from '@nestjs/common';\nimport { SkipTurnstile } from 'nest-cloudflare-turnstile';\n\n@Controller('health')\n@SkipTurnstile()\nexport class HealthController {\n  @Get()\n  check() {\n    return { status: 'ok' };\n  }\n}\n",[922],{"type":17,"tag":75,"props":923,"children":924},{"__ignoreMap":7},[925],{"type":31,"value":920},{"type":17,"tag":18,"props":927,"children":928},{},[929,931,936],{"type":31,"value":930},"The global guard also covers GraphQL resolvers, and WebSocket messages on NestJS 12. For GraphQL, send the token in the ",{"type":17,"tag":75,"props":932,"children":934},{"className":933},[],[935],{"type":31,"value":80},{"type":31,"value":937}," header. For WebSockets, put it in each message. Since a token works once, every guarded field or message needs a fresh one, so one solved challenge can't cover a batch of login attempts.",{"type":17,"tag":50,"props":939,"children":941},{"id":940},"testing-nestjs-apps-that-use-turnstile",[942],{"type":31,"value":943},"Testing NestJS apps that use Turnstile",{"type":17,"tag":18,"props":945,"children":946},{},[947],{"type":31,"value":948},"In tests that aren't about the captcha, turn the guard off:",{"type":17,"tag":188,"props":950,"children":953},{"className":951,"code":952,"language":229,"meta":7},[227],"TurnstileModule.forRoot({\n  secretKey: process.env.TURNSTILE_SECRET_KEY,\n  skipIf: process.env.NODE_ENV === 'test',\n});\n",[954],{"type":17,"tag":75,"props":955,"children":956},{"__ignoreMap":7},[957],{"type":31,"value":952},{"type":17,"tag":18,"props":959,"children":960},{},[961],{"type":31,"value":962},"To test how your app handles a rejected token, swap the service for the stub the module ships. It answers without a network call:",{"type":17,"tag":188,"props":964,"children":967},{"className":965,"code":966,"language":229,"meta":7},[227],"import { Test } from '@nestjs/testing';\nimport {\n  createTurnstileServiceStub,\n  TurnstileService,\n} from 'nest-cloudflare-turnstile';\nimport { AppModule } from '../src/app.module';\n\nconst moduleRef = await Test.createTestingModule({ imports: [AppModule] })\n  .overrideProvider(TurnstileService)\n  .useValue(createTurnstileServiceStub('fail'))\n  .compile();\n",[968],{"type":17,"tag":75,"props":969,"children":970},{"__ignoreMap":7},[971],{"type":31,"value":966},{"type":17,"tag":18,"props":973,"children":974},{},[975,981,982,988,989,995,997,1002],{"type":17,"tag":75,"props":976,"children":978},{"className":977},[],[979],{"type":31,"value":980},"'pass'",{"type":31,"value":423},{"type":17,"tag":75,"props":983,"children":985},{"className":984},[],[986],{"type":31,"value":987},"'fail'",{"type":31,"value":150},{"type":17,"tag":75,"props":990,"children":992},{"className":991},[],[993],{"type":31,"value":994},"'spent'",{"type":31,"value":996}," behave like the matching test keys, and the rest of the module stays real, so your ",{"type":17,"tag":75,"props":998,"children":1000},{"className":999},[],[1001],{"type":31,"value":554},{"type":31,"value":1003}," runs as it would in production.",{"type":17,"tag":50,"props":1005,"children":1007},{"id":1006},"cloudflare-turnstile-vs-recaptcha",[1008],{"type":31,"value":1009},"Cloudflare Turnstile vs reCAPTCHA",{"type":31,"value":1011},"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",{"type":17,"tag":592,"props":1013,"children":1014},{},[1015,1034],{"type":17,"tag":596,"props":1016,"children":1017},{},[1018],{"type":17,"tag":600,"props":1019,"children":1020},{},[1021,1024,1029],{"type":17,"tag":604,"props":1022,"children":1023},{},[],{"type":17,"tag":604,"props":1025,"children":1026},{},[1027],{"type":31,"value":1028},"Cloudflare Turnstile",{"type":17,"tag":604,"props":1030,"children":1031},{},[1032],{"type":31,"value":1033},"Google reCAPTCHA",{"type":17,"tag":615,"props":1035,"children":1036},{},[1037,1055,1073,1107],{"type":17,"tag":600,"props":1038,"children":1039},{},[1040,1045,1050],{"type":17,"tag":622,"props":1041,"children":1042},{},[1043],{"type":31,"value":1044},"What the server gets",{"type":17,"tag":622,"props":1046,"children":1047},{},[1048],{"type":31,"value":1049},"Accept or reject",{"type":17,"tag":622,"props":1051,"children":1052},{},[1053],{"type":31,"value":1054},"A score from 0.0 to 1.0 (v3) that you set a threshold for",{"type":17,"tag":600,"props":1056,"children":1057},{},[1058,1063,1068],{"type":17,"tag":622,"props":1059,"children":1060},{},[1061],{"type":31,"value":1062},"Visitor experience",{"type":17,"tag":622,"props":1064,"children":1065},{},[1066],{"type":31,"value":1067},"Usually no puzzle; an interactive check only when Cloudflare is unsure",{"type":17,"tag":622,"props":1069,"children":1070},{},[1071],{"type":31,"value":1072},"v2 checkbox or image puzzles; v3 runs in the background",{"type":17,"tag":600,"props":1074,"children":1075},{},[1076,1081,1094],{"type":17,"tag":622,"props":1077,"children":1078},{},[1079],{"type":31,"value":1080},"Free usage",{"type":17,"tag":622,"props":1082,"children":1083},{},[1084,1086,1093],{"type":31,"value":1085},"Free plan with unlimited challenges, up to 20 widgets per account (",{"type":17,"tag":39,"props":1087,"children":1090},{"href":1088,"rel":1089},"https://developers.cloudflare.com/turnstile/plans/",[43],[1091],{"type":31,"value":1092},"Cloudflare plans",{"type":31,"value":769},{"type":17,"tag":622,"props":1095,"children":1096},{},[1097,1099,1106],{"type":31,"value":1098},"10,000 assessments per month per organization, then paid tiers (",{"type":17,"tag":39,"props":1100,"children":1103},{"href":1101,"rel":1102},"https://docs.cloud.google.com/recaptcha/docs/billing-information",[43],[1104],{"type":31,"value":1105},"Google billing",{"type":31,"value":769},{"type":17,"tag":600,"props":1108,"children":1109},{},[1110,1115,1120],{"type":17,"tag":622,"props":1111,"children":1112},{},[1113],{"type":31,"value":1114},"Needs a Cloudflare-proxied site",{"type":17,"tag":622,"props":1116,"children":1117},{},[1118],{"type":31,"value":1119},"No, it works on any site",{"type":17,"tag":622,"props":1121,"children":1122},{},[1123],{"type":31,"value":1124},"No",{"type":17,"tag":18,"props":1126,"children":1127},{},[1128],{"type":31,"value":1129},"The free usage numbers were current on the providers' pages when I wrote this; check them before you plan around them. For most forms I reach for Turnstile now: there's no score threshold to tune, and the free plan doesn't run out.",{"type":17,"tag":50,"props":1131,"children":1133},{"id":1132},"migrating-from-nestlabgoogle-recaptcha",[1134],{"type":31,"value":1135},"Migrating from @nestlab/google-recaptcha",{"type":17,"tag":18,"props":1137,"children":1138},{},[1139,1141,1147],{"type":31,"value":1140},"If your NestJS app already uses ",{"type":17,"tag":75,"props":1142,"children":1144},{"className":1143},[],[1145],{"type":31,"value":1146},"@nestlab/google-recaptcha",{"type":31,"value":1148},", most of the move is renaming:",{"type":17,"tag":160,"props":1150,"children":1151},{},[1152,1169,1184],{"type":17,"tag":69,"props":1153,"children":1154},{},[1155,1161,1163],{"type":17,"tag":75,"props":1156,"children":1158},{"className":1157},[],[1159],{"type":31,"value":1160},"GoogleRecaptchaModule.forRoot",{"type":31,"value":1162}," becomes ",{"type":17,"tag":75,"props":1164,"children":1166},{"className":1165},[],[1167],{"type":31,"value":1168},"TurnstileModule.forRoot",{"type":17,"tag":69,"props":1170,"children":1171},{},[1172,1178,1179],{"type":17,"tag":75,"props":1173,"children":1175},{"className":1174},[],[1176],{"type":31,"value":1177},"@Recaptcha()",{"type":31,"value":1162},{"type":17,"tag":75,"props":1180,"children":1182},{"className":1181},[],[1183],{"type":31,"value":392},{"type":17,"tag":69,"props":1185,"children":1186},{},[1187,1189,1195],{"type":31,"value":1188},"the ",{"type":17,"tag":75,"props":1190,"children":1192},{"className":1191},[],[1193],{"type":31,"value":1194},"score",{"type":31,"value":1196}," option goes away, because Turnstile has no score",{"type":17,"tag":18,"props":1198,"children":1199},{},[1200,1202,1207,1209,1216],{"type":31,"value":1201},"In the browser, swap the reCAPTCHA widget for the Turnstile one and send its token in ",{"type":17,"tag":75,"props":1203,"children":1205},{"className":1204},[],[1206],{"type":31,"value":80},{"type":31,"value":1208},". The ",{"type":17,"tag":39,"props":1210,"children":1213},{"href":1211,"rel":1212},"https://halitsever.github.io/nest-cloudflare-turnstile/from-google-recaptcha",[43],[1214],{"type":31,"value":1215},"migration guide",{"type":31,"value":1217}," maps every option, decorator and error code.",{"type":17,"tag":50,"props":1219,"children":1221},{"id":1220},"faq",[1222],{"type":31,"value":1223},"FAQ",{"type":17,"tag":1225,"props":1226,"children":1228},"h3",{"id":1227},"is-cloudflare-turnstile-free",[1229],{"type":31,"value":1230},"Is Cloudflare Turnstile free?",{"type":17,"tag":18,"props":1232,"children":1233},{},[1234],{"type":31,"value":1235},"Yes. The free plan has unlimited challenges and allows up to 20 widgets per account. Enterprise adds things like more hostnames per widget and Ephemeral IDs.",{"type":17,"tag":1225,"props":1237,"children":1239},{"id":1238},"does-my-site-need-to-be-on-cloudflare-to-use-turnstile",[1240],{"type":31,"value":1241},"Does my site need to be on Cloudflare to use Turnstile?",{"type":17,"tag":18,"props":1243,"children":1244},{},[1245],{"type":31,"value":1246},"No. The widget and the siteverify API work on any site, proxied through Cloudflare or not.",{"type":17,"tag":1225,"props":1248,"children":1250},{"id":1249},"can-i-reuse-a-turnstile-token",[1251],{"type":31,"value":1252},"Can I reuse a Turnstile token?",{"type":17,"tag":18,"props":1254,"children":1255},{},[1256,1258,1263],{"type":31,"value":1257},"No. Cloudflare accepts each token once and expires it after five minutes. A second check of the same token returns ",{"type":17,"tag":75,"props":1259,"children":1261},{"className":1260},[],[1262],{"type":31,"value":792},{"type":31,"value":1264},", which the guard turns into an \"Invalid\" 400.",{"type":17,"tag":1225,"props":1266,"children":1268},{"id":1267},"where-should-i-check-the-token-in-a-middleware-an-interceptor-or-a-guard",[1269],{"type":31,"value":1270},"Where should I check the token, in a middleware, an interceptor or a guard?",{"type":17,"tag":18,"props":1272,"children":1273},{},[1274,1276,1281],{"type":31,"value":1275},"A guard. Guards run before interceptors and pipes and decide whether the handler runs at all, which is exactly the question a captcha answers. They also see the route's metadata, which is how per-route actions and ",{"type":17,"tag":75,"props":1277,"children":1279},{"className":1278},[],[1280],{"type":31,"value":906},{"type":31,"value":1282}," work.",{"type":17,"tag":1225,"props":1284,"children":1286},{"id":1285},"how-do-i-test-without-a-real-widget",[1287],{"type":31,"value":1288},"How do I test without a real widget?",{"type":17,"tag":18,"props":1290,"children":1291},{},[1292,1294,1299,1300,1305,1307,1313,1315,1321],{"type":31,"value":1293},"Use Cloudflare's test keys (",{"type":17,"tag":75,"props":1295,"children":1297},{"className":1296},[],[1298],{"type":31,"value":630},{"type":31,"value":445},{"type":17,"tag":75,"props":1301,"children":1303},{"className":1302},[],[1304],{"type":31,"value":739},{"type":31,"value":1306},") for end-to-end checks, ",{"type":17,"tag":75,"props":1308,"children":1310},{"className":1309},[],[1311],{"type":31,"value":1312},"skipIf",{"type":31,"value":1314}," to turn the guard off, or ",{"type":17,"tag":75,"props":1316,"children":1318},{"className":1317},[],[1319],{"type":31,"value":1320},"createTurnstileServiceStub",{"type":31,"value":1322}," to fake an answer in unit tests.",{"type":17,"tag":18,"props":1324,"children":1325},{},[1326,1328,1335,1337,1343,1345,1351],{"type":31,"value":1327},"The module is MIT licensed, and the ",{"type":17,"tag":39,"props":1329,"children":1332},{"href":1330,"rel":1331},"https://halitsever.github.io/nest-cloudflare-turnstile/",[43],[1333],{"type":31,"value":1334},"docs",{"type":31,"value":1336}," cover every option. If you need help adding Turnstile or anything else to a NestJS backend, ",{"type":17,"tag":39,"props":1338,"children":1340},{"href":1339},"/hire",[1341],{"type":31,"value":1342},"I take on projects",{"type":31,"value":1344},". For a comparison of NestJS itself with plain Express, see ",{"type":17,"tag":39,"props":1346,"children":1348},{"href":1347},"/posts/nestjs-vs-express",[1349],{"type":31,"value":1350},"NestJS vs Express",{"type":31,"value":82},{"title":7,"searchDepth":1353,"depth":1353,"links":1354},2,[1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367],{"id":52,"depth":1353,"text":55},{"id":134,"depth":1353,"text":137},{"id":206,"depth":1353,"text":209},{"id":280,"depth":1353,"text":283},{"id":378,"depth":1353,"text":381},{"id":471,"depth":1353,"text":474},{"id":580,"depth":1353,"text":583},{"id":836,"depth":1353,"text":839},{"id":892,"depth":1353,"text":895},{"id":940,"depth":1353,"text":943},{"id":1006,"depth":1353,"text":1009},{"id":1132,"depth":1353,"text":1135},{"id":1220,"depth":1353,"text":1223,"children":1368},[1369,1371,1372,1373,1374],{"id":1227,"depth":1370,"text":1230},3,{"id":1238,"depth":1370,"text":1241},{"id":1249,"depth":1370,"text":1252},{"id":1267,"depth":1370,"text":1270},{"id":1285,"depth":1370,"text":1288},"markdown","content:posts:cloudflare-turnstile-nestjs.md","content","posts/cloudflare-turnstile-nestjs.md","md",{"loc":4},[1382,1386,1390,1394,1398,1402,1406,1410,1414,1418,1422,1425,1429,1433,1437,1441,1445,1449,1453,1457,1461,1465,1469,1473,1478,1482,1486],{"_path":1383,"title":1384,"description":1385},"/posts/github-fake-team-scam","GitHub scam: my face is selling a product I never touched","A paid project on GitHub listed me as a contributor in its README, with my photo and name. I have never committed a line to it. Here is the proof, why AI makes this kind of fake credibility cheap, and how to check whether your name is being used too.",{"_path":1387,"title":1388,"description":1389,"lang":600},"/posts/api-nedir","API nedir? REST API, HTTP istekleri ve durum kodları","API nedir, ne işe yarar? curl ile gerçek bir API isteği, REST API nedir, HTTP metodları, durum kodları ve API'lerde kimlik doğrulama, sade bir dille.",{"_path":1391,"title":1392,"description":1393,"lang":600},"/posts/backend-nedir","Backend nedir, backend developer ne iş yapar? Frontend ile farkı","Backend nedir, backend developer ne iş yapar? Sunucu, API ve veritabanı tarafını, frontend ile farkını ve küçük bir NestJS örneğini anlatıyorum.",{"_path":1395,"title":1396,"description":1397,"lang":600},"/posts/bursa-gunubirlik-gezi-mudanya-koza-han-golyazi","Bursa günübirlik gezi: Mudanya, Koza Han, İskender ve Gölyazı","İstanbul'dan Bursa'ya günübirlik gezi: Mudanya'da kahvaltı, Koza Han, Mavi Dükkan'da Bursa iskender ve Gölyazı'daki 725 yıllık Ağlayan Çınar.",{"_path":1399,"title":1400,"description":1401},"/posts/claude-code-headless","Claude Code headless mode: claude -p in scripts and CI","How Claude Code headless mode works: claude -p, text and JSON output, permission flags, bare mode, auth tokens and running it in scripts and GitHub Actions.",{"_path":1403,"title":1404,"description":1405,"lang":600},"/posts/claude-code-nedir","Claude Code nedir, nasıl kurulur ve kullanılır?","Claude Code nedir? Anthropic'in kodlama aracının kurulumu, giriş, temel komutlar, CLAUDE.md, izin modları ve sunucuda paralel kullanımı, örneklerle.",{"_path":1407,"title":1408,"description":1409},"/posts/claude-code-skills","Claude Code skills: what they are and how to write one","Claude Code skills explained: SKILL.md and its frontmatter, where skills live, how they trigger, and how to write one step by step, with a real example.",{"_path":1411,"title":1412,"description":1413,"lang":600},"/posts/docker-nedir","Docker nedir? Image, container, kurulum ve Docker Compose","Docker nedir, ne işe yarar? Image, container, volume ve network kavramları, Ubuntu'ya Docker kurulumu ve küçük bir docker-compose.yml örneği.",{"_path":1415,"title":1416,"description":1417,"lang":600},"/posts/full-stack-developer-nedir","Full stack developer nedir, ne iş yapar, nasıl olunur?","Full stack developer nedir, ne iş yapar? Frontend, backend, veritabanı ve deploy katmanları, gerçek bir stack, 2026 maaş verisi ve nasıl olunacağı.",{"_path":1419,"title":1420,"description":1421,"lang":600},"/posts/istanbul-yazilim-sirketleri","İstanbul yazılım şirketleri: nasıl seçilir ve kimler var? (2026)","İstanbul yazılım şirketleri arasında nasıl seçim yapılır? Sorulacak sorular, sözleşme ve kod sahipliği, uyarı işaretleri ve bilinen şirketlerden bir liste.",{"_path":1347,"title":1423,"description":1424},"NestJS vs Express: the same endpoint in both, and when to pick which","NestJS vs Express from a NestJS developer: the same API in both, testing, performance numbers from the official docs, and when to pick each.",{"_path":1426,"title":1427,"description":1428,"lang":600},"/posts/node-js-nedir","Node.js nedir? Event loop, npm ve ilk HTTP sunucusu","Node.js nedir, ne işe yarar? Event loop'un sade bir anlatımı, npm, sıfırdan bir HTTP sunucusu ve Node.js'in diğer backend seçenekleri arasındaki yeri.",{"_path":1430,"title":1431,"description":1432},"/posts/nuxt-seo","Nuxt SEO: the setup I use on this site, with the real config","A practical Nuxt SEO guide from halit.org: sitemap, robots, schema.org, useSeoMeta, real 404s, prerendering, hreflang and the nofollow default in Nuxt Content.",{"_path":1434,"title":1435,"description":1436},"/posts/nuxt-vs-next","Nuxt vs Next: an honest comparison from someone who ships Nuxt","Nuxt vs Next compared on Nuxt 4.6 and Next.js 16: rendering modes, routing, data fetching, ecosystem and deployment, with code for the same page in both.",{"_path":1438,"title":1439,"description":1440,"lang":600},"/posts/prometheus-grafana-nedir","Prometheus nedir, Grafana nedir? node_exporter ile sunucu izleme","Prometheus nedir, Grafana nedir ve birlikte nasıl çalışırlar? Metrikler, exporter'lar, node_exporter, PromQL örnekleri ve Docker Compose ile kurulum.",{"_path":1442,"title":1443,"description":1444},"/posts/teleparty-alternative","Teleparty alternative: free ways to watch together online","Looking for a Teleparty alternative? An honest look at Watchbear, Discord Watch Together and Watch2Gether for watching YouTube and Netflix with friends.",{"_path":1446,"title":1447,"description":1448,"lang":600},"/posts/typescript-nedir","TypeScript nedir? JavaScript'e ne ekler, tsconfig nasıl ayarlanır?","TypeScript nedir, JavaScript'ten farkı ne? Tipler, union, generic ve narrowing örnekleri, tsconfig.json'un temel ayarları ve Node.js ile kullanımı.",{"_path":1450,"title":1451,"description":1452,"lang":600},"/posts/yazilimci-maaslari-2026","Yazılımcı maaşları 2026: kıdem, pozisyon, şehir ve çalışma düzenine göre","Yazılımcı maaşları 2026: 5.002 kişilik anketin ham verisinden hesapladığım junior, middle, senior, pozisyon, şehir ve remote maaş ortancaları.",{"_path":1454,"title":1455,"description":1456,"lang":600},"/posts/yazilimci-nasil-olunur","Yazılımcı nasıl olunur? Yazılım öğrenmek için pratik bir yol","Yazılımcı nasıl olunur, yazılım öğrenmeye nereden başlanır? 2012'de forumlarla başlayıp 2020'den beri profesyonel çalışan bir yazılımcının pratik planı.",{"_path":1458,"title":1459,"description":1460},"/posts/running-claude-code-on-a-server-in-parallel","How I run multiple Claude Code agents in parallel on a server","My Claude Code setup: an Ubuntu server set up with claude-code-vps, parallel agents in a tmux grid with claudegrid, and the HaltOS desktop on top.",{"_path":1462,"title":1463,"description":1464},"/posts/small-web-tools-json-to-excel-steam-deck-watchbear","Small web tools I made: JSON to Excel, Steam Deck web apps, Watchbear","A JSON to Excel converter, a generator that puts any website in Steam Deck Game Mode, and Watchbear for watching videos in sync with friends.",{"_path":1466,"title":1467,"description":1468,"lang":600},"/posts/udf-dosyasi-nasil-acilir-pdf-word-cevirme","UDF dosyası nasıl açılır, PDF'ye ve Word'e nasıl çevrilir?","UYAP'ın UDF dosyasını program kurmadan tarayıcıda açmak, PDF'ye ve Word'e çevirmek, Word ve PDF'den UDF hazırlamak. Her aracın neyi koruyup neyi kaybettiğiyle birlikte.",{"_path":1470,"title":1471,"description":1472},"/posts/i-built-a-free-chrome-extension-to-watch-any-video-in-sync-with-friends","I built a free Chrome extension to watch any video in sync with friends","Watchbear is my free Chrome extension to watch YouTube together with friends: start a room, share the link, and play, pause and seek stay in sync.",{"_path":1474,"title":1475,"description":1476,"lang":1477},"/posts/a-short-trip-to-bursa","A day trip to Bursa: Mudanya, Koza Han, Iskender and Gölyazı","A day trip to Bursa via the Osmangazi Bridge, breakfast in Mudanya, Koza Han, Mavi Dükkan Iskender, and a peaceful visit to Gölyazı.","en",{"_path":1479,"title":1480,"description":1481},"/posts/embedding-metabase-dashboard-on-nuxt-app","Embedding a Metabase dashboard in a Nuxt 3 app","Metabase embedding in Nuxt 3: sign the embed JWT in a server route, lock parameters per user, set token expiry and theme the embedded dashboard.",{"_path":1483,"title":1484,"description":1485},"/posts/grafana-deep-dive","Grafana Docker Compose setup with Prometheus and node_exporter","Monitor a server with Grafana in Docker: a docker-compose.yml for Grafana, Prometheus and node_exporter, the scrape config, and a ready-made dashboard.",{"_path":1487,"title":1488,"description":1489},"/posts/deploy-express-app-on-vercel","Deploying an Express.js application on Vercel","How to deploy an Express app on Vercel: the zero-config way, the older vercel.json setup, environment variables, logs and serverless limits.",null,1795616417834]