-
Notifications
You must be signed in to change notification settings - Fork 329
/
lorawan_server.config
63 lines (63 loc) · 2.49 KB
/
lorawan_server.config
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
%%-*-erlang-*-
[
% server configuration
{lorawan_server, [
% UDP port listening for packets from the packet_forwarder Gateway
{packet_forwarder_listen, [{port, 1680}]},
% HTTP port for web-administration and REST API
{http_admin_listen, [{port, 8080}]},
% HTTP/SSL port
{http_admin_listen_ssl, [
{port, 8443},
{certfile, "cert.pem"},
{cacertfile, "cacert.pem"},
{keyfile, "key.pem"}
]},
% Enable this line for the Newly added cluster nodes
% {db_master, 'lorawan@yourhost'},
% redirect all http traffic to https (when both http and https are enabled)
{http_admin_redirect_ssl, true},
% default username and password for the admin interface
{http_admin_credentials, {<<"admin">>, <<"admin">>}},
% headers to be added to each HTTP response
{http_extra_headers, #{
% <<"access-control-allow-origin">> => <<"http://127.0.0.1:3000">>,
% <<"access-control-allow-credentials">> => <<"true">>,
% <<"access-control-allow-methods">> => <<"OPTIONS, GET, PUT, POST, DELETE">>,
% <<"access-control-allow-headers">> => <<"content-type">>,
% <<"access-control-expose-headers">> => <<"x-total-count">>
% <<"content-security-policy">> => <<"default-src * data: 'unsafe-inline' 'unsafe-eval';">>
}},
{http_custom_web, [
% enable this to serve additional web-pages
% {"/www", file, <<"/var/www/html/index.html">>, [{<<"anonymous">>, '*'}]},
% {"/www/[...]", dir, <<"/var/www/html">>, [{<<"anonymous">>, '*'}]}
]},
% Enable the following line to export statistics metrics in Prometheus format
% {enable_prometheus, true},
% amount of rxframes retained for each device/node
{retained_rxframes, 50},
% websocket expiration if client sends no data
{websocket_timeout, 3600000} % ms
]},
{os_mon, [
% Setting this parameter to true can be necessary on embedded systems with
% stripped-down versions of Unix tools like df.
{disksup_posix_only, false}
]},
% error logging settings
{lager, [
{colored, true},
% uncomment to display even a high number of messages per second
% see https://github.com/erlang-lager/lager#overload-protection
% {error_logger_hwm, undefined},
{handlers, [
% {lager_console_backend, [{level, debug}]},
{lager_file_backend, [{file, "debug.log"}, {level, debug}]},
{lager_file_backend, [{file, "error.log"}, {level, error}]}
]},
{crash_log, "crash.log"}
]},
{sasl, [
{errlog_type, error}
]}].