Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Caddy

Edward Cui8c9f1295adc8
diff --git a/Caddyfile b/Caddyfile
index 95cdea683..8ad69aef6 100644
--- a/Caddyfile
+++ b/Caddyfile
@@ -3,8 +3,19 @@
# Enable compression
encode zstd gzip
- request_body max_size 10MB
+ # Special handling for import endpoint with custom size limit
+ handle /api/import-site-data/* {
+ request_body {
+ max_size {$MAX_IMPORT_SIZE:0}
+ }
+ reverse_proxy backend:3001
+ }
+
+ # All other API endpoints with 10MB limit
handle /api/* {
+ request_body {
+ max_size 10MB
+ }
reverse_proxy backend:3001
}
diff --git a/docker-compose.cloud.yml b/docker-compose.cloud.yml
index 5cae27622..87c752899 100644
--- a/docker-compose.cloud.yml
+++ b/docker-compose.cloud.yml
@@ -17,6 +17,8 @@ services:
# Pass domain name for use in Caddyfile
# Email is configured via Caddyfile global options
- DOMAIN_NAME=${DOMAIN_NAME}
+ # 500MB limit for import endpoint on cloud
+ - MAX_IMPORT_SIZE=500MB
depends_on:
- backend
- client
diff --git a/docker-compose.yml b/docker-compose.yml
index d58ae9bbb..694942d7e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -16,6 +16,8 @@ services:
# Pass domain name for use in Caddyfile
# Email is configured via Caddyfile global options
- DOMAIN_NAME=${DOMAIN_NAME}
+ # No limit for import endpoint on self-hosted (empty value = unlimited)
+ # - MAX_IMPORT_SIZE=
depends_on:
- backend
- client