From 6a63c441fe378ca6dd630ad05e29647903f898bc Mon Sep 17 00:00:00 2001 From: Nick <17260520+NickantX@users.noreply.github.com> Date: Mon, 16 Oct 2023 01:10:19 -0400 Subject: [PATCH] fix: forward x-audit-log-reason header (#9889) fix(proxy): forward x-audit-log-reason header --- packages/proxy/src/handlers/proxyRequests.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/proxy/src/handlers/proxyRequests.ts b/packages/proxy/src/handlers/proxyRequests.ts index bef004913..a98423445 100644 --- a/packages/proxy/src/handlers/proxyRequests.ts +++ b/packages/proxy/src/handlers/proxyRequests.ts @@ -32,6 +32,10 @@ export function proxyRequests(rest: REST): RequestHandler { headers.authorization = req.headers.authorization; } + if (req.headers['x-audit-log-reason']) { + headers['x-audit-log-reason'] = req.headers['x-audit-log-reason'] as string; + } + try { const discordResponse = await rest.queueRequest({ body: req,