Skip to content

Commit

Permalink
Backport of upstream commit 3b773ec
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand authored Jan 19, 2021
1 parent 49b3e43 commit b96a009
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exchangelib/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@


def extra_headers(account):
"""Generate extra HTTP headers
"""
Generate extra headers for impersonation requests. See
https://blogs.msdn.microsoft.com/webdav_101/2015/05/11/best-practices-ews-authentication-and-access-issues/
"""
if account and account.access_type == IMPERSONATION:
if account:
# See
# https://blogs.msdn.microsoft.com/webdav_101/2015/05/11/best-practices-ews-authentication-and-access-issues/
return {'X-AnchorMailbox': account.primary_smtp_address}
return None

Expand Down

0 comments on commit b96a009

Please sign in to comment.