This repository was archived by the owner on Mar 3, 2026. It is now read-only.
forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjooby.conf
More file actions
243 lines (178 loc) · 6.89 KB
/
jooby.conf
File metadata and controls
243 lines (178 loc) · 6.89 KB
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
###################################################################################################
#! application
###################################################################################################
application {
# environment default is: dev
env = dev
# contains the simple name of package of your application bootstrap class.
# For example: com.foo.App -> foo
# name = App.class.getPackage().getName().lastSegment()
# application namespace, default to app package. set it at runtime
# ns = App.class.getPackage().getName()
# class = App.class.getName()
# tmpdir
tmpdir = ${java.io.tmpdir}/${application.name}
# path (a.k.a. as contextPath)
path = /
# localhost
host = localhost
# HTTP ports
port = 8080
# uncomment to enabled HTTPS
# securePort = 8443
# we do UTF-8
charset = UTF-8
# date/time format
dateFormat = dd-MMM-yyyy
zonedDateTimeFormat = "yyyy-MM-dd'T'HH:mm:ss[.S]XXX"
# number format, system default. set it at runtime
# numberFormat = DecimalFormat.getInstance(${application.lang})).toPattern()
# comma separated list of locale using the language tag format. Default to: Locale.getDefault()
# lang = Locale.getDefault()
# timezone, system default. set it at runtime
# tz = ZoneId.systemDefault().getId()
# redirect to/force https
# example: https://my.domain.com/{0}
redirect_https = ""
}
ssl {
# An X.509 certificate chain file in PEM format, provided certificate should NOT be used in prod.
keystore.cert = org/jooby/unsecure.crt
# A PKCS#8 private key file in PEM format, provided key should NOT be used in prod.
keystore.key = org/jooby/unsecure.key
# password of the keystore.key (if any)
# keystore.password =
# Trusted certificates for verifying the remote endpoint's certificate. The file should
# contain an X.509 certificate chain in PEM format. Default uses the system default.
# trust.cert =
# Set the size of the cache used for storing SSL session objects. 0 to use the
# default value.
session.cacheSize = 0
# Timeout for the cached SSL session objects, in seconds. 0 to use the default value.
session.timeout = 0
}
###################################################################################################
#! session defaults
###################################################################################################
session {
# we suggest a timeout, but usage and an implementation is specific to a Session.Store implementation
timeout = 30m
# save interval, how frequently we must save a none-dirty session (in millis).
saveInterval = 60s
cookie {
# name of the cookie
name = jooby.sid
# cookie path
path = /
# expires when the user closes the web browser
maxAge = -1
httpOnly = true
secure = false
}
}
###################################################################################################
#! flash scope defaults
###################################################################################################
flash {
cookie {
name = jooby.flash
path = ${application.path}
httpOnly = true
secure = false
}
}
###################################################################################################
#! server defaults
###################################################################################################
server {
http {
HeaderSize = 8k
# Max response buffer size
ResponseBufferSize = 16k
# Max request body size to keep in memory
RequestBufferSize = 1m
# Max request size total (body + header)
MaxRequestSize = 200k
IdleTimeout = 0
Method = ""
}
threads {
# Min = Math.max(4, ${runtime.processors})
# Max = Math.max(32, ${runtime.processors-x8})
IdleTimeout = 60s
}
routes {
# Guava Cache Spec
Cache = "concurrencyLevel="${runtime.concurrencyLevel}",maximumSize="${server.threads.Max}
}
ws {
# The maximum size of a text message.
MaxTextMessageSize = 16k
# The maximum size of a binary message.
MaxBinaryMessageSize = 16k
# The time in ms (milliseconds) that a websocket may be idle before closing.
IdleTimeout = 5minutes
}
http2 {
cleartext = true
enabled = false
}
}
###################################################################################################
#! assets
###################################################################################################
assets {
#! If asset CDN is present, the asset router will do a redirect to CDN and wont serve the file locally
#! /assets/js/index.js -> redirectTo(cdn + assets/js/index.js)
cdn = ""
etag = true
lastModified = true
env = ${application.env}
charset = ${application.charset}
# -1 to disable or HOCON duration value
cache.maxAge = -1
}
###################################################################################################
#! Cross origin resource sharing
###################################################################################################
cors {
# Configures the Access-Control-Allow-Origin CORS header. Possibly values: *, domain, regex or a list of previous values.
# Example:
# "*"
# ["http://foo.com"]
# ["http://*.com"]
# ["http://foo.com", "http://bar.com"]
origin: "*"
# If true, set the Access-Control-Allow-Credentials header
credentials: true
# Allowed methods: Set the Access-Control-Allow-Methods header
allowedMethods: [GET, POST]
# Allowed headers: set the Access-Control-Allow-Headers header. Possibly values: *, header name or a list of previous values.
# Examples
# "*"
# Custom-Header
# [Header-1, Header-2]
allowedHeaders: [X-Requested-With, Content-Type, Accept, Origin]
# Preflight max age: number of seconds that preflight requests can be cached by the client
maxAge: 30m
# Set the Access-Control-Expose-Headers header
# exposedHeaders: []
}
###################################################################################################
#! runtime
###################################################################################################
#! number of available processors, set it at runtime
#! runtime.processors = Runtime.getRuntime().availableProcessors()
#! runtime.processors-plus1 = ${runtime.processors} + 1
#! runtime.processors-plus2 = ${runtime.processors} + 2
#! runtime.processors-x2 = ${runtime.processors} * 2
###################################################################################################
#! status codes
###################################################################################################
err.java.lang.IllegalArgumentException = 400
err.java.util.NoSuchElementException = 400
err.java.io.FileNotFoundException = 404
###################################################################################################
#! alias
###################################################################################################
contextPath = ${application.path}