Fix minor typos to get Olly's website working again
authorNick Downing <nick@ndcode.org>
Sat, 19 Jan 2019 02:46:19 +0000 (13:46 +1100)
committerNick Downing <nick@ndcode.org>
Sat, 19 Jan 2019 02:46:19 +0000 (13:46 +1100)
Site.js
package.json

diff --git a/Site.js b/Site.js
index f33933c..7b7e7a8 100644 (file)
--- a/Site.js
+++ b/Site.js
@@ -251,8 +251,8 @@ Site.prototype.redirect = function(env, pathname, message) {
     `${env.parsed_url.host} redirecting ${env.parsed_url.pathname} to ${pathname}`
   )
   let location = pathname + (env.parsed_url.search || '')
-  response.statusCode = 301
-  response.setHeader('Location', location)
+  env.response.statusCode = 301
+  env.response.setHeader('Location', location)
   this.serve_internal(
     env.response,
     301,
index b9fd2d4..5dc3755 100644 (file)
@@ -19,7 +19,7 @@
   },
   "bin": {
     "jst_server": "cli.js"
-  }
+  },
   "main": "index.js",
   "engines": {
     "node": ">=0.4.0"