Skip to content

Commit

Permalink
Merge pull request #94 from Gutek/patch-2
Browse files Browse the repository at this point in the history
Adding Exposed headers for CORS
  • Loading branch information
James Nugent committed Feb 14, 2014
2 parents b60acad + d12e0cc commit 7466e47
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ private void SetRequiredHeaders()
HttpEntity.Response.AddHeader("Access-Control-Allow-Methods", string.Join(", ", _allowedMethods)); HttpEntity.Response.AddHeader("Access-Control-Allow-Methods", string.Join(", ", _allowedMethods));
HttpEntity.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, X-Requested-With, X-PINGOTHER, Authorization"); HttpEntity.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, X-Requested-With, X-PINGOTHER, Authorization");
HttpEntity.Response.AddHeader("Access-Control-Allow-Origin", "*"); HttpEntity.Response.AddHeader("Access-Control-Allow-Origin", "*");
HttpEntity.Response.AddHeader("Access-Control-Expose-Headers", "Location");
if (HttpEntity.Response.StatusCode == HttpStatusCode.Unauthorized) if (HttpEntity.Response.StatusCode == HttpStatusCode.Unauthorized)
HttpEntity.Response.AddHeader("WWW-Authenticate", "Basic realm=\"ES\""); HttpEntity.Response.AddHeader("WWW-Authenticate", "Basic realm=\"ES\"");
} }
Expand Down

0 comments on commit 7466e47

Please sign in to comment.