Chrome does not see Access-Control-Expose-Headers header

时间:2017-08-30 20:10:37

标签: javascript google-chrome header cors etag

I have a problem with Chrome - in the network tab it only displays an empty 1 2 1 3 2 3 2 5 and node 4 has no edges header.

chrome network tab screenshot

In postman the header's value is visible:

postman screenshot

When trying to access the ETag header through the enabled -eq $true method of the $userID = Import-Csv "c:\users.csv" foreach ($user in $userID) { $employeeID = $user.employeeID Get-ADUser -Filter {employeeID -eq $employeeID -and Enabled -eq $false} -Properties displayName,employeeID,mail,intelOwnerID,title,"msDS-UserPasswordExpiryTimeComputed","lastLogon" | select "Displayname", "Enabled", @{n="PasswordExpiryDate";e={[DateTime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}, @{n='LastLogon';e={[DateTime]::FromFileTime($_.lastLogon)}}, SamAccountName, employeeID, mail, intelOwnerID, title | Export-Csv -Append "c:\temp\usersacct.csv" I'm getting a Access-Control-Exposed-Headers error. I already ran out of ideas how to fix this. Does anybody know what could be wrong?

EDIT: Apparently that behaviour is caused by the getResponseHeader('ETag') header - when it is present in the request, the XMLHttpRequest in the response is empty. Unfortunately, I don't have access to the backend code, so I can't provide an example. All response headers:

Refused to get unsafe header "etag"

0 个答案:

没有答案