I'm trying to read a token from a cookie and ad it to the headers at each query.
I tried this:
Restangular.setDefaultHeaders({ Authorization: "Token " + $cookieStore.get('token') })
It works, but the cookie only gets read once. At page load. Then if the value of the cookie changes, it keeps the first value instead of sending the updated value.
Any idea how I can read the cookie each time?