Fix caching headers
This commit is contained in:
parent
8d9be438a6
commit
fe034c7bf6
@ -120,6 +120,7 @@ let ajaxService = AjaxService.extend({
|
|||||||
let headers = {};
|
let headers = {};
|
||||||
|
|
||||||
headers['X-Ghost-Version'] = config.APP.version;
|
headers['X-Ghost-Version'] = config.APP.version;
|
||||||
|
headers['App-Pragma'] = 'no-cache';
|
||||||
|
|
||||||
if (session.get('isAuthenticated')) {
|
if (session.get('isAuthenticated')) {
|
||||||
session.authorize('authorizer:oauth2', (headerName, headerValue) => {
|
session.authorize('authorizer:oauth2', (headerName, headerValue) => {
|
||||||
|
@ -175,7 +175,7 @@ export default Service.extend({
|
|||||||
|
|
||||||
headers.Authorization = `Client-ID ${this.get('applicationId')}`;
|
headers.Authorization = `Client-ID ${this.get('applicationId')}`;
|
||||||
headers['Accept-Version'] = API_VERSION;
|
headers['Accept-Version'] = API_VERSION;
|
||||||
headers['API-User-Agent'] = 'Ghost';
|
headers['App-Pragma'] = 'no-cache';
|
||||||
|
|
||||||
return fetch(url, {headers})
|
return fetch(url, {headers})
|
||||||
.then((response) => this._checkStatus(response))
|
.then((response) => this._checkStatus(response))
|
||||||
|
Loading…
Reference in New Issue
Block a user