mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +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;
|
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 {
|
try {
|
||||||
const discordResponse = await rest.queueRequest({
|
const discordResponse = await rest.queueRequest({
|
||||||
body: req,
|
body: req,
|
||||||
|
|||||||
Reference in New Issue
Block a user