Fix caching headers

This commit is contained in:
Kevin Ansfield 2017-08-24 14:36:31 +01:00
parent 8d9be438a6
commit fe034c7bf6
2 changed files with 2 additions and 1 deletions

View File

@ -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) => {

View File

@ -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))