-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconfig.json.sample.json
More file actions
63 lines (60 loc) · 2.46 KB
/
config.json.sample.json
File metadata and controls
63 lines (60 loc) · 2.46 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Remove all commentaries inside this configuration file before use the proxy !!!!!!!
[
{
"hostProxy" : "acme.com", // name of the virtual server
"host": "://tex.avery.org", // name of the physical server
"port": 7777, // port number of the physical server
"path": "", // additional path information to access the physical server
"logFile": "acme.log", // name of the log file
"rewritePath": { // rewrite the hostProxy name inside the answer headers
"enable":true,
"headersOffset":0 // also remove "part" of the path information (a part is the string between two '/')
},
"hideAuth":true, // hide the authentication information inside the http headers of the request
"ldap": { // LDAP server information
"url": "ldap://ldap.acme.com",
"id":"cn=", // how the user id is define in the request
"cn":"dc=acme,dc=com" // other entries in the request
},
"restricted": { // information about resources with restricted access
"rocket": ["will.coyote"], // "name_of_the_resource_inside_the_url": ["list", "of", "authorized", "users", "id"],
"magnet": ["will.coyote"],
"false hole": ["will.coyote"],
"rifle": ["elmer.fudd"],
"ammo": ["elmer.fudd"]
},
"rules":[ { // list rules that define the proxy behaviours for this server
"control": "request.method != 'GET'", // define when this rules is trigged
"action": "authentifyLDAP(context, function(){AuthorizList(context, function(){proxyWork(context, function(){});});});", // what the proxy has to do
"final": true // define if the proxy has to search for other relevents rules
},{
"control": "true",
"action": "proxyWork(context, function(){});",
"final": true
}]
},
{"hostProxy":"test.acme.shop.com",
"host": "tex.test.server.com",
"port": 1337,
"path": "/test/shop/acme/path",
"logFile": "test_shop_acme.log",
"rewritePath": {
"enable":true,
"headersOffset":0
},
"hideAuth":true,
"authData": { // information for the dummy authentication
"login": "roadrunner",
"pw": "bipbip"
},
"rules": [{
"control": "request.method != 'GET'",
"action": "authentifyDummy(context, function(){proxyWork(context, function(){});});",
"final": true
},{
"control": "true",
"action": "proxyWork(context, function(){});",
"final": true
}]
}
]