Skip to content

Commit

Permalink
Bugfix for adding header #316 , #318
Browse files Browse the repository at this point in the history
  • Loading branch information
ramtinak committed Feb 25, 2020
1 parent 6faf41e commit 9c943f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InstagramApiSharp/Helpers/HttpHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public HttpRequestMessage GetDefaultRequest(HttpMethod method, Uri uri, AndroidD
request.Headers.Add(InstaApiConstants.HEADER_X_WWW_CLAIM, wwwClaim);

var authorization = _instaApi.GetLoggedUser()?.Authorization;
if (!string.IsNullOrEmpty(dsUserId))
if (!string.IsNullOrEmpty(dsUserId) && !string.IsNullOrEmpty(authorization))
request.Headers.Add(InstaApiConstants.HEADER_AUTHORIZATION, authorization);

request.Headers.Add(InstaApiConstants.HEADER_X_IG_BLOKS_IS_LAYOUT_RTL, "false");
Expand Down

0 comments on commit 9c943f0

Please sign in to comment.