Unable to get ETags to work
jackpf opened this issue · 1 comments
jackpf commented
Hi,
Can't seem to get etags to work, not sure if I'm missing something. I'm performing a get then a put like so:
Restangular.one(resource, event.id).get().then(function (currentEvent) {
currentEvent[propertyName] = newValue;
currentEvent.put().then(function() {
event[propertyName] = newValue; // Update scope
$.notify(text + ' updated', {
globalPosition: 'top center',
className: 'success'
});
});
});
And an 'ETag' header is returned as a header in the first get, however neither an If-Match or an If-None-Match header is added to the subsequent put request.
Is there some configuration I'm missing?
Thanks for any help
jackpf commented
Ah my mistake, Access-Control-Expose-Headers was not allowing restangular to see the etag