mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: forward x-audit-log-reason header (#9889)
fix(proxy): forward x-audit-log-reason header
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user