Skip to content

Commit

Permalink
Destroying the session on static assets (implied caching)
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Mar 28, 2018
1 parent ab0f254 commit 6912d1b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions lib/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,7 @@ function statik (req, res) {
if (err2 !== void 0) {
res.error(404);
} else {
if (res.hasHeader("set-cookie") === true) {
res.removeHeader("set-cookie");
}

req.session = void 0;
stream(req, res, err3 => {
if (err3 !== void 0) {
res.error(404);
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is an elastic REST API gateway for node.js",
"version": "6.4.4",
"version": "6.4.5",
"homepage": "http://avoidwork.github.io/tenso",
"author": "Jason Mulligan <[email protected]>",
"repository": {
Expand Down

0 comments on commit 6912d1b

Please sign in to comment.