You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+84-10Lines changed: 84 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,22 @@ In this handler are the following modules in use.
19
19
IMPORTANT: The relative paths are relative to the current web root
20
20
directory `http.vars.root`!
21
21
22
+
=== Environment Variables
23
+
24
+
.Parameters
25
+
[cols="2,6",options=header]
26
+
|===
27
+
|Name
28
+
|Description
29
+
30
+
|**APPPORT**
31
+
|The Port on which Caddyserver should listen. The format depends which Configuration file format you use. See the official Caddyserver documentation for the format https://caddyserver.com/docs/conventions#network-addresses[Network addresses]
32
+
33
+
|**SKIP_LOG**
34
+
|With this variable can you control if the health check will be logged or not. This feature was implemented as part of the vars handler.
35
+
36
+
|===
37
+
22
38
=== Parameters
23
39
24
40
.Parameters
@@ -45,7 +61,7 @@ directory be evaluated at runtime from this variable `http.vars.root`.
45
61
46
62
|**max_form_buffer**
47
63
|The maximum buffer size for https://pkg.go.dev/net/http#Request.ParseMultipartForm[ParseMultipartForm]. It accepts all size values supported by https://pkg.go.dev/github.com/dustin/go-humanize#pkg-constants[go-humanize]. Here can also be used a https://caddyserver.com/docs/conventions#placeholders[Placeholder] +
48
-
JSON: `"{env.MAXFILESIZE}"` +
64
+
JSON: `"{env.MAXBUFFSIZE}"` +
49
65
Caddyfile: `{$MAXBUFFSIZE}` +
50
66
51
67
The default size is **1G**.
@@ -58,7 +74,7 @@ The default size is **1G**.
58
74
|is the maximum size in bytes allowed for the upload.
59
75
It accepts all size values supported by https://pkg.go.dev/github.com/dustin/go-humanize#pkg-constants[go-humanize]. Reads of more bytes will return an error with HTTP status 413. Here can also be used a https://caddyserver.com/docs/conventions#placeholders[Placeholder] +
60
76
JSON: `"{env.MAXFILESIZE}"` +
61
-
Caddyfile: `{$MAXBUFFSIZE}` +
77
+
Caddyfile: `{$MAXFILESIZE}` +
62
78
63
79
The default size is **1G**.
64
80
@@ -174,28 +190,28 @@ Here a example Caddyfile which expects that the environment variable
174
190
175
191
=== local
176
192
[source,shell]
177
-
---
193
+
----
178
194
xcaddy build --with github.com/kirsch33/realip \
179
195
--with github.com/git001/caddyv2-upload
180
-
---
196
+
----
181
197
182
198
=== docker
183
199
[source,shell]
184
-
---
200
+
----
185
201
buildah bud --tag caddyv2-upload .
186
202
# or
187
203
docker build --tag caddyv2-upload .
188
-
---
204
+
----
189
205
190
206
== run
191
207
192
208
=== cli
193
209
194
210
[source,shell]
195
-
---
211
+
----
196
212
APPPORT=:2011 ./caddy run \
197
213
-config Caddyfile-upload.json
198
-
---
214
+
----
199
215
200
216
=== docker
201
217
@@ -208,14 +224,72 @@ The default listen port must be defined with this variable
0 commit comments