Skip to content

Commit

Permalink
fix: forward x-audit-log-reason header (#9889)
Browse files Browse the repository at this point in the history
fix(proxy): forward x-audit-log-reason header
  • Loading branch information
NickantX committed Oct 16, 2023
1 parent 8964504 commit 6a63c44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/proxy/src/handlers/proxyRequests.ts
Expand Up @@ -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,
Expand Down

0 comments on commit 6a63c44

Please sign in to comment.