Skip to content

Commit

Permalink
Merge pull request #59 from ecederstrand/patch-1
Browse files Browse the repository at this point in the history
Backport of upstream commit 3b773ec
  • Loading branch information
pengfeiye authored Jan 20, 2021
2 parents 49b3e43 + b96a009 commit 3c9ac92
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 3c9ac92

Please sign in to comment.