Merge pull request #4068 from hashicorp/b-ui-firefox-index-watching

UI: Check for a case-sensitive or lowercase header value
This commit is contained in:
Michael Lange 2018-03-29 12:41:31 -06:00 committed by GitHub
commit 0cdfee7155
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,9 @@ export default ApplicationAdapter.extend({
},
handleResponse(status, headers, payload, requestData) {
const newIndex = headers['x-nomad-index'];
// Some browsers lowercase all headers. Others keep them
// case sensitive.
const newIndex = headers['x-nomad-index'] || headers['X-Nomad-Index'];
if (newIndex) {
this.get('watchList').setIndexFor(requestData.url, newIndex);
}