about summary refs log tree commit diff
path: root/bundles/lhost/files/Caddyfile
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/lhost/files/Caddyfile')
-rw-r--r--bundles/lhost/files/Caddyfile45
1 files changed, 45 insertions, 0 deletions
diff --git a/bundles/lhost/files/Caddyfile b/bundles/lhost/files/Caddyfile
new file mode 100644
index 0000000..497ef30
--- /dev/null
+++ b/bundles/lhost/files/Caddyfile
@@ -0,0 +1,45 @@
+# vim: noet ts=2 sw=2
+{
+	admin off
+	auto_https off
+	http_port {$CADDY_HTTP_PORT:1414}
+}
+
+http:// {
+	encode zstd gzip
+
+	handle /healthz {
+		respond OK 200
+	}
+
+	handle {
+		root .
+		file_server {
+			hide Caddyfile
+			hide .keep
+		}
+	}
+
+	# catch all
+	respond 404
+
+	log {
+		format filter {
+			wrap console {
+				time_format wall_milli
+				level_format color
+			}
+			fields {
+				common_log delete
+				request>headers>Accept-Encoding delete
+				request>headers>Accept-Language delete
+				request>headers>Connection delete
+				request>headers>Authorization delete
+				request>remote_addr ip_mask {
+					ipv4 24
+					ipv6 32
+				}
+			}
+		}
+	}
+}