You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found that our app never GETs 304 for subsequent requests when it should to.
After some investigations I found that the reason is https://github.com/lynndylanhurley/ng-token-auth/blob/master/src/ng-token-auth.coffee#L920 which sets If-Modified-Since header to Mon, 26 Jul 1997 05:00:00 GMT $http-widely. This makes browser not to set If-none-match header even if the previous response to the same resource had etag header provided (tested in Chrome 55, Firefox 48).
As we don't support IE8-9, I just fixed the issue by resetting
$httpProvider.defaults.headers.get={};
From the more common point of view, don't you think it would be better if ng-token-auth set such If-Modified-Since header on per-request basis?
I'm not very familiar with coffeescript, but think I'll be able to come up with PR if you agree.
Cheers.
The text was updated successfully, but these errors were encountered:
Hey guys,
first of all, thanks for the wonderful module!
Found that our app never GETs 304 for subsequent requests when it should to.
After some investigations I found that the reason is https://github.com/lynndylanhurley/ng-token-auth/blob/master/src/ng-token-auth.coffee#L920 which sets
If-Modified-Since
header toMon, 26 Jul 1997 05:00:00 GMT
$http-widely. This makes browser not to setIf-none-match
header even if the previous response to the same resource hadetag
header provided (tested in Chrome 55, Firefox 48).As we don't support IE8-9, I just fixed the issue by resetting
From the more common point of view, don't you think it would be better if
ng-token-auth
set suchIf-Modified-Since
header on per-request basis?I'm not very familiar with coffeescript, but think I'll be able to come up with PR if you agree.
Cheers.
The text was updated successfully, but these errors were encountered: