Skip to content

Commit c3f41fb

Browse files
committed
feat: production hardening and code separation
- Stack-allocate request bodies ≤64KB to avoid malloc in hot path - Only cache body if module exports on_request_body handler - Track heap allocation in proxy_ctx for correct cleanup - Split proxy_wasm.c (2670→1256 lines) into focused modules: - proxy_wasm_mem.h: shared memory helper inlines - proxy_wasm_headers.c: header map operations - proxy_wasm_properties.c: property get/set - proxy_wasm_http.c: HTTP callout with anti-IP-rebinding - All 16 tests passing
1 parent eeb4993 commit c3f41fb

10 files changed

Lines changed: 1569 additions & 2344 deletions

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y \
1717
xz-utils \
1818
&& rm -rf /var/lib/apt/lists/*
1919

20-
# Install Varnish 8.0 from packagecloud
20+
# Install Varnish 8.0 (latest open-source release) from packagecloud
2121
RUN curl -fsSL https://packagecloud.io/varnishcache/varnish80/gpgkey \
2222
| gpg --dearmor -o /usr/share/keyrings/varnish.gpg \
2323
&& echo "deb [signed-by=/usr/share/keyrings/varnish.gpg] https://packagecloud.io/varnishcache/varnish80/debian/ bookworm main" \

src/Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ libvmod_wasm_la_SOURCES = \
1111
host_functions.h \
1212
proxy_wasm.c \
1313
proxy_wasm.h \
14+
proxy_wasm_mem.h \
15+
proxy_wasm_headers.c \
16+
proxy_wasm_properties.c \
17+
proxy_wasm_http.c \
1418
proxy_wasm_shared.c \
1519
proxy_wasm_shared.h
1620

0 commit comments

Comments
 (0)