forked from OpenRailwayMap/OpenRailwayMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxy.js
More file actions
25 lines (21 loc) · 694 Bytes
/
proxy.js
File metadata and controls
25 lines (21 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
OpenRailwayMap Copyright (C) 2012 Alexander Matheisen
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions.
See http://wiki.openstreetmap.org/wiki/OpenRailwayMap for details.
*/
var http = require('http');
var httpProxy = require('http-proxy');
var options =
{
hostnameOnly: true,
router:
{
'www.openrailwaymap.org': '127.0.0.1:8080',
'tiles.openrailwaymap.org': '127.0.0.1:9000',
'a.tiles.openrailwaymap.org': '127.0.0.1:9000',
'b.tiles.openrailwaymap.org': '127.0.0.1:9000',
'c.tiles.openrailwaymap.org': '127.0.0.1:9000'
}
};
var proxyServer = httpProxy.createServer(options).listen(80);