Skip to content

Commit

Permalink
do not fail on FakrRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Mar 6, 2020
1 parent 01d995c commit f177d69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/server/http/router/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ export class KibanaRequest<
this.events = this.getEvents(request);

this.auth = {
isAuthenticated: request.auth.isAuthenticated,
// missing in fakeRequests, so we cast to false
isAuthenticated: Boolean(request.auth?.isAuthenticated),
};
}

Expand Down

0 comments on commit f177d69

Please sign in to comment.