Skip to content

Commit

Permalink
Merge pull request #532 from d00rman/parsoid/ensure-headers
Browse files Browse the repository at this point in the history
Parsoid: Ensure res.headers is set before setting cache-control
  • Loading branch information
Marko Obrovac committed Mar 2, 2016
2 parents dad16c2 + f5b978a commit 3adbce0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "restbase",
"version": "0.11.2",
"version": "0.11.3",
"description": "REST storage and service dispatcher",
"main": "lib/server.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions sys/parsoid.js
Expand Up @@ -486,13 +486,13 @@ PSP.getFormat = function(format, hyper, req) {
return contentReq
.then(function(res) {
mwUtil.normalizeContentType(res);
if (self.options.response_cache_control) {
res.headers['cache-control'] = self.options.response_cache_control;
}
HyperSwitch.misc.addCSPHeaders(res, {
domain: rp.domain,
allowInline: true,
});
if (self.options.response_cache_control) {
res.headers['cache-control'] = self.options.response_cache_control;
}
return res;
});
};
Expand Down

0 comments on commit 3adbce0

Please sign in to comment.