@@ -264,7 +264,7 @@ repository root for more details) but will instead assume you already have a
264
264
Unit with the WebAssembly language module already running, perhaps installed
265
265
via a package.
266
266
267
- Create the following Unit config
267
+ Create the following Unit config (editing the module paths as appropriate)
268
268
269
269
``` JSON
270
270
{
@@ -276,7 +276,7 @@ Create the following Unit config
276
276
277
277
"settings" : {
278
278
"http" : {
279
- "max_body_size" : 1073741824
279
+ "max_body_size" : 8589934592
280
280
}
281
281
},
282
282
@@ -297,6 +297,14 @@ Create the following Unit config
297
297
"pass" : " applications/luw-upload-reflector"
298
298
}
299
299
},
300
+ {
301
+ "match" : {
302
+ "uri" : " /large-upload*"
303
+ },
304
+ "action" : {
305
+ "pass" : " applications/large-upload"
306
+ }
307
+ },
300
308
{
301
309
"match" : {
302
310
"uri" : " /rust-echo*"
@@ -315,7 +323,15 @@ Create the following Unit config
315
323
},
316
324
{
317
325
"match" : {
318
- "uri" : " /hello-world*"
326
+ "uri" : " /rust-large-upload*"
327
+ },
328
+ "action" : {
329
+ "pass" : " applications/rust-large-upload"
330
+ }
331
+ },
332
+ {
333
+ "match" : {
334
+ "uri" : " /rust-hello-world*"
319
335
},
320
336
"action" : {
321
337
"pass" : " applications/rust-hello-world"
@@ -342,6 +358,21 @@ Create the following Unit config
342
358
"request_end_handler" : " luw_request_end_handler" ,
343
359
"response_end_handler" : " luw_response_end_handler"
344
360
},
361
+ "large-upload" : {
362
+ "type" : " wasm" ,
363
+ "module" : " /path/to/unit-wasm/examples/c/large-upload.wasm" ,
364
+ "request_handler" : " luw_request_handler" ,
365
+ "malloc_handler" : " luw_malloc_handler" ,
366
+ "free_handler" : " luw_free_handler" ,
367
+ "module_init_handler" : " luw_module_init_handler" ,
368
+ "module_end_handler" : " luw_module_end_handler" ,
369
+ "response_end_handler" : " luw_response_end_handler" ,
370
+ "access" : {
371
+ "filesystem" : [
372
+ " /var/tmp"
373
+ ]
374
+ }
375
+ },
345
376
"rust-echo-request" : {
346
377
"type" : " wasm" ,
347
378
"module" : " /path/to/unit-wasm/examples/rust/echo-request/target/wasm32-wasi/debug/rust_echo_request.wasm" ,
@@ -360,6 +391,21 @@ Create the following Unit config
360
391
"request_end_handler" : " uwr_request_end_handler" ,
361
392
"response_end_handler" : " uwr_response_end_handler"
362
393
},
394
+ "rust-large-upload" : {
395
+ "type" : " wasm" ,
396
+ "module" : " /path/to/src/unit-wasm/examples/rust/large-upload/target/wasm32-wasi/debug/rust_large_upload.wasm" ,
397
+ "request_handler" : " uwr_request_handler" ,
398
+ "malloc_handler" : " luw_malloc_handler" ,
399
+ "free_handler" : " luw_free_handler" ,
400
+ "module_init_handler" : " uwr_module_init_handler" ,
401
+ "module_end_handler" : " uwr_module_end_handler" ,
402
+ "response_end_handler" : " uwr_response_end_handler" ,
403
+ "access" : {
404
+ "filesystem" : [
405
+ " /var/tmp"
406
+ ]
407
+ }
408
+ },
363
409
"rust-hello-world" : {
364
410
"type" : " wasm" ,
365
411
"module" : " /path/to/unit-wasm/examples/rust/hello-world/target/wasm32-wasi/debug/rust_hello_world.wasm" ,
0 commit comments