-
Notifications
You must be signed in to change notification settings - Fork 323
/
janus.sample.toml
218 lines (199 loc) · 5.53 KB
/
janus.sample.toml
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
################################################################
# Global configuration
################################################################
#
# port = 8080
#
# SSL certificate and key used
#
# Optional
#
# [tls]
# port = 8433
# redirect = true
# CertFile = "janus.crt"
# KeyFile = "janus.key"
#
# Enable debug mode
#
# Optional
# Default: false
#
# debug = true
#
# Timeout in seconds.
# Duration to give active requests a chance to finish during hot-reloads
#
# Optional
# Default: 10
#
# graceTimeOut = 10
# If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used.
# If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value.
#
# Optional
# Default: http.DefaultMaxIdleConnsPerHost
# MaxIdleConnsPerHost = 200
#
# Flush interval for upgraded Proxy connections.
# Optional
# BackendFlushInterval = 0
#
# Defines the maximum amount of time an idle (keep-alive) connection will remain idle before closing itself.
# Optional
# Default: "90s"
#
# IdleConnTimeout = "90s"
#
# Defines if Janus should create a X-Request-Id
# Optional
# Default: true
# RequestID = true
#[respondingTimeouts]
# readTimeout is the maximum duration for reading the entire request, including the body.
#
# Optional
# Default: "0s"
#
# readTimeout = "5s"
# writeTimeout is the maximum duration before timing out writes of the response.
#
# Optional
# Default: "0s"
#
# writeTimeout = "5s"
# idleTimeout is the maximum duration an idle (keep-alive) connection will remain idle before closing itself.
#
# Optional
# Default: "180s"
#
# idleTimeout = "360s"
################################################################
# Clustering
################################################################
# [cluster]
# UpdateFrequency = "5s"
################################################################
# Logging
################################################################
# Configure Janus logging
# See https://github.com/hellofresh/logging-go for complete documentation
#[log]
# level = "info"
# format = "json"
# writer = "stderr"
################################################################
# Management API configuration backend
################################################################
[web]
# port = 8081
# SSL certificate and key used
#
# Optional
# [web.tls]
# port = 8444
# redirect = true
# CertFile = "janus.crt"
# KeyFile = "janus.key"
#
# Basic JWT configuration
#
# Required
#
[web.credentials]
# The algorithm that you want to use to create your JWT
algorithm = "HS256"
# This is the secret that you will use to encrypt your JWT
secret = "secret key"
# This is the duration before the issued administration token expires
# timeout = "1h"
# [web.credentials.github]
# organizations = ["yourOrganization"]
# teams = {yourOrganization = "devs"}
# [web.credentials.basic]
# users = {admin = "admin"}
################################################################
# Metrics
################################################################
[stats]
# Backend system used to export collected metrics
#
# Valid Values: "datadog", "prometheus", or "stackdriver"
#
# Default: None
#
# Exporter: "prometheus"
# To enable Janus to export internal metrics to Statsd
# dsn = "statsd:8125"
# prefix = "sandbox.janus."
################################################################
# Proxy Definition Database
################################################################
# You can choose to use `mongodb` or `file based` databases to store your
# API definition configuration.
#
# WARNING, if you use Janus in Docker, you have 2 options:
# - create a file on your host and mount it as a volume
# storageFile = "acme.json"
# $ docker run -v "/my/host/janus" janus
# - mount the folder containing the file as a volume
# dsn = "file:///etc/janus"
# $ docker run -v "/my/host/acme:/etc/janus" janus
#
# Required
#
# [database]
# dsn = "file:///etc/janus"
#
# If you want to use mongodb enable this
# [database]
# dsn = "mongodb://janus-database:27017/janus"
################################################################
# Distributed Tracing
################################################################
[tracing]
# Backend system to export traces to
#
# Default: None
#
Exporter = "jaeger"
# Service name used in the backend
#
# Default: "janus"
#
ServiceName = "janus"
# SamplingStrategy specifies the sampling strategy
#
# Valid Values: "probabilistic", "always", "never"
#
# Default: "probabilistic"
#
SamplingStrategy = "probabilistic"
# If set to false, trace metadata set in incoming requests will be
# added as the parent span of the trace.
#
# See the following link for more details:
# https://godoc.org/go.opencensus.io/plugin/ochttp#Handler
#
# Default: true
#
IsPublicEndpoint = true
# SamplingParam is an additional value passed to the sampler.
#
# Valid Values:
# - for "always" and "never" sampler, this value is unused
# - for "probabilistic" sampler, a probability between 0 and 1
#
# Default: "0.15"
#
SamplingParam = "0.15"
# Requests that have X-Debug-Trace header set with the value of DebugTraceKey will
# force sampling, and additionally will have the Trace ID returned in their responses
# on the X-Debug-Trace header.
DebugTraceKey = ""
[tracing.jaeger]
# SamplingServerURL is the address to the sampling server
#
# Default: None
#
SamplingServerURL = "localhost:6832"