aboutsummaryrefslogtreecommitdiff
path: root/routes/meetingpointProxy.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-05-27 11:44:07 +0200
committerNoah Loomans <noahloomans@gmail.com>2017-05-27 11:44:07 +0200
commit69406c43ea899c3956aa16a9e0834aff40c8510f (patch)
tree2eea9d827f0a692a63dd8e1117ba892f1300cc7d /routes/meetingpointProxy.js
parent457946531c57a546eeb3c42042ad192ac9826299 (diff)
Rewrite /meetingpointProxy into /get
This makes it simple and more secure, and this improves server logging.
Diffstat (limited to 'routes/meetingpointProxy.js')
-rw-r--r--routes/meetingpointProxy.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/routes/meetingpointProxy.js b/routes/meetingpointProxy.js
deleted file mode 100644
index 68f3fdf..0000000
--- a/routes/meetingpointProxy.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const express = require('express')
-const router = express.Router()
-const request = require('request')
-const iconv = require('iconv-lite')
-
-router.get('/:url', function (req, res, next) {
- const url = `http://www.meetingpointmco.nl/${req.params.url}`
- request(url, { encoding: null }, function (err, data) {
- if (err) {
- next(err)
- return
- }
-
- const utf8Body = iconv.decode(data.body, 'ISO-8859-1')
- res.status(data.statusCode).end(utf8Body)
- })
-})
-
-module.exports = router