summaryrefslogtreecommitdiffstats
path: root/go/index.js
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2014-01-05 23:09:08 +0100
committertv <tv@nomic.retiolum>2014-01-05 23:09:08 +0100
commitf769dc7b006dd3d896729344a5f67fb74dc6786e (patch)
treecc326ea223e8ffa6b0c3cc25bf19fc795b1963da /go/index.js
parente0bd4306d7f2284058b0f0910cf4e84e7c78b4f9 (diff)
go: redirect with 302
Diffstat (limited to 'go/index.js')
-rw-r--r--go/index.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/go/index.js b/go/index.js
index 723fb78a..470010a9 100644
--- a/go/index.js
+++ b/go/index.js
@@ -68,8 +68,11 @@ function retrieve (req, res) {
return res.end('not found\r\n');
}
- res.writeHead(200, { 'content-type': 'text/plain' });
- return res.end(reply + '\r\n');
+ res.writeHead(302, {
+ 'content-type': 'text/plain',
+ 'location': reply,
+ });
+ return res.end();
});
}