diff --git a/packages/rest/src/manager.ts b/packages/rest/src/manager.ts index e80c94fcf..f0be03873 100644 --- a/packages/rest/src/manager.ts +++ b/packages/rest/src/manager.ts @@ -534,7 +534,7 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage async makeRequest(method, route, options) { if (rest.isProxied) { - if (rest.authorization !== undefined) { + if (rest.authorization) { options ??= {} options.headers ??= {} options.headers[rest.authorizationHeader] = rest.authorization diff --git a/packages/rest/src/types.ts b/packages/rest/src/types.ts index 0052030ff..28acaea0a 100644 --- a/packages/rest/src/types.ts +++ b/packages/rest/src/types.ts @@ -154,12 +154,12 @@ export interface CreateRestManagerOptions { */ baseUrl: string /** The authorization header value to attach when sending requests to the proxy. */ - authorization: string + authorization?: string /** * The authorization header name to use when sending requests to the proxy * * @remarks - * If the `authorization` header is used it will override any authorization that is given even if + * If the header name is set to `authorization`, it will override any authorization that is given even if * the requests uses OAuth2 Bearer tokens / Basic tokens * * @default "authorization" // For compatibility purposes