-
Notifications
You must be signed in to change notification settings - Fork 3
/
httptables.conf
91 lines (76 loc) · 1.92 KB
/
httptables.conf
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Lua Settings
lua_package_path '$prefix/conf/httptables/lua/?.lua;;';
lua_code_cache on;
lua_shared_dict data 5m;
lua_socket_log_errors off;
init_by_lua_block {
httptables = require "httptables"
httptables.init()
}
init_worker_by_lua_block {
httptables.init_worker()
}
# HttpTables Core
access_by_lua_file conf/httptables/lua/core.lua;
server {
listen 0.0.0.0:10983;
client_max_body_size 10m;
client_body_buffer_size 10m;
access_by_lua_block {
apis = require "apis"
apis.cors()
}
# Should be deleted When deploying a production system
location / {
default_type application/json;
content_by_lua_block {
apis = require "apis"
apis.default()
}
}
location = /admin/role_types {
default_type application/json;
content_by_lua_block {
apis = require "apis"
apis.role_types()
}
}
location = /admin/roles {
default_type application/json;
content_by_lua_block {
apis = require "apis"
apis.roles()
}
}
location = /admin/sorted_role_types {
default_type application/json;
content_by_lua_block {
apis = require "apis"
apis.sorted_role_types()
}
}
location = /admin/notify {
default_type application/json;
content_by_lua_block {
apis = require "apis"
apis.notify()
}
}
location = /admin/status {
default_type application/json;
content_by_lua_block {
apis = require "apis"
apis.status()
}
}
location = /admin/lamda {
default_type application/json;
content_by_lua_block {
apis = require "apis"
apis.lamda()
}
}
location = /robots.txt {
return 200 'User-agent: *\nDisallow: /';
}
}