github.com/hellofresh/janus@v0.0.0-20230925145208-ce8de8183c67/janus.sample.toml (about) 1 ################################################################ 2 # Global configuration 3 ################################################################ 4 # 5 # port = 8080 6 # 7 # SSL certificate and key used 8 # 9 # Optional 10 # 11 # [tls] 12 # port = 8433 13 # redirect = true 14 # CertFile = "janus.crt" 15 # KeyFile = "janus.key" 16 # 17 # Enable debug mode 18 # 19 # Optional 20 # Default: false 21 # 22 # debug = true 23 # 24 # Timeout in seconds. 25 # Duration to give active requests a chance to finish during hot-reloads 26 # 27 # Optional 28 # Default: 10 29 # 30 # graceTimeOut = 10 31 # If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used. 32 # If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value. 33 # 34 # Optional 35 # Default: http.DefaultMaxIdleConnsPerHost 36 # MaxIdleConnsPerHost = 200 37 # 38 # Flush interval for upgraded Proxy connections. 39 # Optional 40 # BackendFlushInterval = 0 41 # 42 # Defines the maximum amount of time an idle (keep-alive) connection will remain idle before closing itself. 43 # Optional 44 # Default: "90s" 45 # 46 # IdleConnTimeout = "90s" 47 # 48 # Defines if Janus should create a X-Request-Id 49 # Optional 50 # Default: true 51 # RequestID = true 52 53 #[respondingTimeouts] 54 # readTimeout is the maximum duration for reading the entire request, including the body. 55 # 56 # Optional 57 # Default: "0s" 58 # 59 # readTimeout = "5s" 60 61 # writeTimeout is the maximum duration before timing out writes of the response. 62 # 63 # Optional 64 # Default: "0s" 65 # 66 # writeTimeout = "5s" 67 68 # idleTimeout is the maximum duration an idle (keep-alive) connection will remain idle before closing itself. 69 # 70 # Optional 71 # Default: "180s" 72 # 73 # idleTimeout = "360s" 74 75 ################################################################ 76 # Clustering 77 ################################################################ 78 # [cluster] 79 # UpdateFrequency = "5s" 80 81 ################################################################ 82 # Logging 83 ################################################################ 84 # Configure Janus logging 85 # See https://github.com/hellofresh/logging-go for complete documentation 86 #[log] 87 # level = "info" 88 # format = "json" 89 # writer = "stderr" 90 91 ################################################################ 92 # Management API configuration backend 93 ################################################################ 94 [web] 95 # port = 8081 96 97 # SSL certificate and key used 98 # 99 # Optional 100 # [web.tls] 101 # port = 8444 102 # redirect = true 103 # CertFile = "janus.crt" 104 # KeyFile = "janus.key" 105 # 106 # Basic JWT configuration 107 # 108 # Required 109 # 110 [web.credentials] 111 # The algorithm that you want to use to create your JWT 112 algorithm = "HS256" 113 # This is the secret that you will use to encrypt your JWT 114 secret = "secret key" 115 # This is the duration before the issued administration token expires 116 # timeout = "1h" 117 118 # [web.credentials.github] 119 # organizations = ["yourOrganization"] 120 # teams = {yourOrganization = "devs"} 121 122 # [web.credentials.basic] 123 # users = {admin = "admin"} 124 125 ################################################################ 126 # Metrics 127 ################################################################ 128 [stats] 129 # Backend system used to export collected metrics 130 # 131 # Valid Values: "datadog", "prometheus", or "stackdriver" 132 # 133 # Default: None 134 # 135 # Exporter: "prometheus" 136 137 # To enable Janus to export internal metrics to Statsd 138 # dsn = "statsd:8125" 139 # prefix = "sandbox.janus." 140 141 ################################################################ 142 # Proxy Definition Database 143 ################################################################ 144 # You can choose to use `mongodb` or `file based` databases to store your 145 # API definition configuration. 146 # 147 # WARNING, if you use Janus in Docker, you have 2 options: 148 # - create a file on your host and mount it as a volume 149 # storageFile = "acme.json" 150 # $ docker run -v "/my/host/janus" janus 151 # - mount the folder containing the file as a volume 152 # dsn = "file:///etc/janus" 153 # $ docker run -v "/my/host/acme:/etc/janus" janus 154 # 155 # Required 156 # 157 # [database] 158 # dsn = "file:///etc/janus" 159 # 160 # If you want to use mongodb enable this 161 # [database] 162 # dsn = "mongodb://janus-database:27017/janus" 163 164 ################################################################ 165 # Distributed Tracing 166 ################################################################ 167 [tracing] 168 # Backend system to export traces to 169 # 170 # Default: None 171 # 172 Exporter = "jaeger" 173 174 # Service name used in the backend 175 # 176 # Default: "janus" 177 # 178 ServiceName = "janus" 179 180 # SamplingStrategy specifies the sampling strategy 181 # 182 # Valid Values: "probabilistic", "always", "never" 183 # 184 # Default: "probabilistic" 185 # 186 SamplingStrategy = "probabilistic" 187 188 # If set to false, trace metadata set in incoming requests will be 189 # added as the parent span of the trace. 190 # 191 # See the following link for more details: 192 # https://godoc.org/go.opencensus.io/plugin/ochttp#Handler 193 # 194 # Default: true 195 # 196 IsPublicEndpoint = true 197 198 # SamplingParam is an additional value passed to the sampler. 199 # 200 # Valid Values: 201 # - for "always" and "never" sampler, this value is unused 202 # - for "probabilistic" sampler, a probability between 0 and 1 203 # 204 # Default: "0.15" 205 # 206 SamplingParam = "0.15" 207 208 # Requests that have X-Debug-Trace header set with the value of DebugTraceKey will 209 # force sampling, and additionally will have the Trace ID returned in their responses 210 # on the X-Debug-Trace header. 211 DebugTraceKey = "" 212 213 [tracing.jaeger] 214 # SamplingServerURL is the address to the sampling server 215 # 216 # Default: None 217 # 218 SamplingServerURL = "localhost:6832"