From 7d7891f6cae7ac169f854c31ab1733e3f9affb25 Mon Sep 17 00:00:00 2001 From: Antony Kurniawan Date: Thu, 9 Oct 2025 03:19:49 +0700 Subject: [PATCH] update: captcha header --- controllers/auth.controller.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/auth.controller.js b/controllers/auth.controller.js index 6ea3349..bf9b553 100644 --- a/controllers/auth.controller.js +++ b/controllers/auth.controller.js @@ -55,6 +55,9 @@ class AuthController { static async generateCaptcha(req, res) { try { const { svg, text } = createCaptcha(); + + res.setHeader('X-Captcha-Text', text); + return res.status(200).json({ data: { svg, text } }); } catch (err) { return res.status(500).json(setResponse([], 'Captcha failed', 500));