fix: forward x-audit-log-reason header (#9889)

fix(proxy): forward x-audit-log-reason header
This commit is contained in:
Nick
2023-10-16 01:10:19 -04:00
committed by GitHub
parent 8964504d07
commit 6a63c441fe

View File

@@ -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,