-
Notifications
You must be signed in to change notification settings - Fork 9
/
schema.json
479 lines (479 loc) · 15.3 KB
/
schema.json
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
{
"$id": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "All the valid configuration parameters for the http plugin for RoadRunner.",
"title": "roadrunner-http",
"type": "object",
"additionalProperties": false,
"properties": {
"address": {
"description": "Host and/or port to listen on for HTTP traffic. If omitted, RoadRunner will not listen for HTTP requests.",
"type": "string",
"minLength": 1,
"examples": [
"127.0.0.1:8080",
":8080"
]
},
"internal_error_code": {
"description": "HTTP status code to use for internal RoadRunner errors. Defaults to 500 if omitted.",
"type": "integer",
"default": 500,
"minimum": 100,
"maximum": 599
},
"max_request_size": {
"description": "Maximum request size in MB. Defaults to 1 GB if zero or omitted.",
"type": "integer",
"minimum": 0,
"default": 1000
},
"raw_body": {
"description": "Whether to send the raw, encoded body for `application/x-www-form-urlencoded` content. Defaults to sending decoded content to PHP workers.",
"type": "boolean",
"default": false
},
"access_logs": {
"description": "Whether to enable HTTP access logs.",
"type": "boolean",
"default": false
},
"middleware": {
"description": "List of middleware to load for the HTTP plugin, executed in the specified order.",
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"enum": [
"headers",
"gzip",
"static",
"sendfile",
"http_metrics",
"cache",
"proxy_ip_parser",
"otel"
]
}
},
"trusted_subnets": {
"description": "List of subnets from which incoming requests are allowed. Defaults to typical private network ranges (192.168.*, 10.0.*, and 172.16.*) and local/loopback interfaces (127.*).",
"type": "array",
"items": {
"type": "string",
"examples": [
"10.0.0.0/8",
"127.0.0.0/8"
]
},
"default": [
"10.0.0.0/8",
"127.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"::1/128",
"fc00::/7",
"fe80::/10"
]
},
"uploads": {
"$ref": "#/$defs/Uploads"
},
"headers": {
"description": "HTTP header configuration.",
"type": "object",
"additionalProperties": false,
"properties": {
"cors": {
"description": "Controls which CORS headers are returned. Additional headers `Vary: Origin`, `Vary: Access-Control-Request-Method` and `Vary: Access-Control-Request-Headers` will be added to responses. Omit this section to disable CORS headers.",
"type": "object",
"properties": {
"allowed_origin": {
"description": "Controls the value of 'Access-Control-Allow-Origin'.",
"type": "string",
"examples": [
"*"
]
},
"allowed_origin_regex": {
"description": "Controls the value of 'Access-Control-Allow-Origin' header value, but evaluated as regex.",
"type": "string",
"examples": [
"^https://foo"
]
},
"allowed_headers": {
"description": "Controls the value of 'Access-Control-Allow-Headers'.",
"type": "string",
"examples": [
"*"
]
},
"allowed_methods": {
"description": "Controls the value of 'Access-Control-Allow-Methods'. Provide a comma-separated string of HTTP verbs.",
"type": "string",
"examples": [
"GET,POST,PUT,DELETE"
]
},
"allow_credentials": {
"description": "Controls the value of 'Access-Control-Allow-Credentials'.",
"type": "boolean",
"default": false
},
"exposed_headers": {
"description": "Controls the value of 'Access-Control-Expose-Headers'. Provide a comma-separated list of HTTP headers.",
"type": "string",
"examples": [
"Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma"
]
},
"max_age": {
"description": "Controls the value of 'Access-Control-Max-Age' (in seconds).",
"type": "integer",
"examples": [
600
],
"default": 0
}
}
},
"request": {
"description": "Custom HTTP headers to add to every request passed to PHP.",
"$ref": "#/$defs/Headers"
},
"response": {
"description": "Custom HTTP headers to add to every response from PHP.",
"$ref": "#/$defs/Headers"
}
}
},
"static": {
"description": "Configuration options for serving static files.",
"type": "object",
"additionalProperties": false,
"properties": {
"dir": {
"description": "Path to the directory with static assets. Defaults to the current working directory. Empty/undefined and `.` are equal and are both treated as current directory.",
"type": "string",
"examples": [
".",
"/var/www/html"
]
},
"forbid": {
"description": "File extensions of files that must not be served. Empty/undefined disallows no files. If files are specified in both `forbid` and `allow`, they will be disallowed. Defaults to an empty array, disallowing no files.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"examples": [
".php",
".htaccess",
".sh"
]
}
},
"allow": {
"description": "File extensions of files that may be served. Empty/undefined allows all files, except files specified in `forbid`.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"examples": [
".jpg",
".png",
".css",
".js"
]
}
},
"calculate_etag": {
"description": "Whether to enable ETag computation for static files.",
"type": "boolean",
"default": false
},
"weak": {
"description": "Whether to use a weak generator (/W), which uses only the filename to generate a CRC32 sum for et ETag. Disable to use the file contents.",
"type": "boolean",
"default": false
},
"request": {
"description": "Custom HTTP headers to add to every request for static files.",
"$ref": "#/$defs/Headers"
},
"response": {
"description": "Custom HTTP headers to add to every response from static files.",
"$ref": "#/$defs/Headers"
}
}
},
"pool": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
},
"ssl": {
"$ref": "#/$defs/SSL"
},
"fcgi": {
"$ref": "#/$defs/FCGI"
},
"http2": {
"$ref": "#/$defs/HTTP2"
},
"http3": {
"$ref": "#/$defs/HTTP3"
}
},
"$defs": {
"Uploads": {
"type": "object",
"additionalProperties": false,
"description": "File upload configuration.",
"properties": {
"dir": {
"description": "Directory for file uploads. Empty/undefined value means the OS default temporary directory ($TEMP) will be used, i.e. `/tmp`.",
"type": "string",
"examples": [
"/tmp"
]
},
"forbid": {
"description": "Disallow upload of files with the provided extensions.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"examples": [
".php",
".sh",
".go"
]
}
},
"allow": {
"description": "Allow only upload of files with the provided extensions. Empty/undefined value means all files except explicitly disallowed (`forbid`) files are allowed.",
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"examples": [
".html",
".go"
]
},
"default": []
}
}
},
"SSL": {
"title": "SSL/TLS (HTTPS) Configuration",
"description": "Settings required to set up manual or automatic HTTPS for your server. Either `key` and `cert` *or* `acme` is required, but not both.",
"type": "object",
"additionalProperties": false,
"dependentRequired": {
"key": [
"cert"
],
"cert": [
"key"
]
},
"properties": {
"address": {
"description": "Host address/or port to bind to. Defaults to 127.0.0.1:443.",
"type": "string",
"default": "127.0.0.1:443",
"examples": [
"127.0.0.1:443",
":8443"
]
},
"acme": {
"description": "ACME certificates provider (Let's encrypt). Do not provide this parameter if you use `key` and `cert`.",
"type": "object",
"additionalProperties": false,
"properties": {
"certs_dir": {
"description": "Directory to use for certificates, private keys, Let's Encrypt configuration etc.",
"type": "string",
"default": "rr_cache_dir"
},
"email": {
"description": "User email used to create a Let's Encrypt account. This is required.",
"type": "string",
"examples": [
]
},
"alt_http_port": {
"description": "Alternate port for the HTTP challenge. Challenge traffic should be redirected to this port if overridden. See https://letsencrypt.org/docs/challenge-types/#http-01-challenge",
"type": "integer",
"default": 80
},
"alt_tlsalpn_port": {
"description": "Alternate port for the TLS-ALPN-01 challenge. Challenge traffic should be redirected to this port if overridden. See https://letsencrypt.org/docs/challenge-types/#tls-alpn-01",
"type": "integer",
"default": 443
},
"challenge_type": {
"type": "string",
"enum": [
"http-01",
"tlsalpn-01"
],
"description": "Challenge types",
"default": "http-01"
},
"use_production_endpoint": {
"description": "Whether to use the production endpoint. We recommend you use the staging endpoint to make sure everything works correctly before you deploy your certificate.",
"type": "boolean",
"default": false
},
"domains": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"examples": [
"example.com"
]
},
"description": "List of domains to obtain certificates for. At least one domain is required."
}
},
"required": [
"domains",
"email"
]
},
"redirect": {
"description": "Whether to automatically redirect from HTTP to HTTPS.",
"type": "boolean",
"default": false
},
"key": {
"description": "Path to the private key for the certificate. Must not be provided if `acme` is set.",
"type": "string",
"minLength": 1,
"examples": [
"/ssl/server/key.pem"
]
},
"cert": {
"description": "Path to the public certificate file. Must not be provided if `acme` is set.",
"type": "string",
"minLength": 1,
"examples": [
"/ssl/server/cert.crt"
]
},
"root_ca": {
"description": "Path to the CA certificate, if required. Always required for mTLS. Omit this option if unused. Must not be provided if `acme` is set.",
"type": "string",
"minLength": 1,
"examples": [
"/ssl/server/ca.crt"
]
},
"client_auth_type": {
"$ref": "#/$defs/ClientAuthType"
}
}
},
"ClientAuthType": {
"description": "Authorization method for mTLS.",
"type": "string",
"default": "no_client_certs",
"enum": [
"request_client_cert",
"require_any_client_cert",
"verify_client_cert_if_given",
"no_client_certs",
"require_and_verify_client_cert"
]
},
"FCGI": {
"description": "Enables FastCGI support. If omitted, RoadRunner will not listen for FCGI requests.",
"type": "object",
"additionalProperties": false,
"properties": {
"address": {
"description": "Host and/or port to listen on for FCGI requests.",
"type": "string",
"minLength": 1,
"examples": [
"0.0.0.0:9000",
"127.0.0.1:9000",
"localhost:9000",
"unix:/path/to/socket.sock"
]
}
},
"required": [
"address"
]
},
"HTTP2": {
"description": "HTTP/2 settings.",
"type": "object",
"additionalProperties": false,
"properties": {
"h2c": {
"description": "Use HTTP/2 over non-encrypted TCP connection using H2C",
"type": "boolean",
"default": false
},
"max_concurrent_streams": {
"description": "Maximum number of concurrent streams. Defaults to 128 if omitted or zero.",
"type": "integer",
"default": 128,
"minimum": 0
}
}
},
"HTTP3": {
"description": "HTTP/3 settings. **Experimental**: Requires that RoadRunner has experimental features enabled. Unless you configured `acme`, you must provide a `key` and `cert` here.",
"type": "object",
"additionalProperties": false,
"required": [
"address"
],
"dependentRequired": {
"cert": [
"key"
],
"key": [
"cert"
]
},
"properties": {
"address": {
"description": "Host and/or port to listen on for HTTP/3.",
"type": "string",
"minLength": 1,
"examples": [
"127.0.0.1:8080",
":8080"
]
},
"cert": {
"$ref": "#/$defs/SSL/properties/cert"
},
"key": {
"$ref": "#/$defs/SSL/properties/key"
}
}
},
"Headers": {
"type": "object",
"minProperties": 1,
"patternProperties": {
"^[a-zA-Z0-9._-]+$": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
}
}