mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fix auth header caching in ajax service
closes https://github.com/TryGhost/Ghost/issues/6884 - mark the `headers` method in the ajax service as "volatile" - it's dependent key was causing the auth headers to be cached on first use which would then cause 401 errors once the token had been refreshed externally It would also be possible to add `session.authenticated.access_token` as a dependent key but the code-path and usage are minimal so I believe `.volatile()` is preferable as it means that it's not tied directly to the authorizer implementation.
This commit is contained in:
parent
e308256601
commit
39a09ca28a
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ export default AjaxService.extend({
|
|||
}
|
||||
|
||||
return headers;
|
||||
}),
|
||||
}).volatile(),
|
||||
|
||||
handleResponse(status, headers, payload) {
|
||||
if (this.isRequestEntityTooLargeError(status, headers, payload)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue