mirror of
https://github.com/makeplane/plane.git
synced 2026-09-01 19:48:42 +02:00
* refactor: migrate from nginx to Caddy for admin and web services
- Updated Dockerfiles to use Caddy as the web server instead of nginx.
- Added Caddyfile configurations for both admin and web services.
- Implemented rate limiting in Caddy using xcaddy.
- Adjusted healthcheck endpoint to reflect new routing in Caddy.
* refactor: remove nginx configuration files for admin and web services
- Deleted nginx.conf files as part of the migration to Caddy.
- Updated Dockerfile to reflect changes in the Caddy build process.
* fix: address review feedback on Caddy configuration
- admin: fix SPA fallback to /god-mode/index.html so deep links resolve
- restrict trusted_proxies to private_ranges instead of 0.0.0.0
- wire rate_limit zone so the compiled caddy-ratelimit module is used
* fix: use client_ip for rate limiting and restore security headers
- rate_limit key {remote_host} -> {client_ip} so per-client buckets are
keyed on the real client IP forwarded by the proxy, not the proxy
connection source
- restore security headers previously emitted by nginx
(X-Frame-Options, X-Content-Type-Options, X-XSS-Protection);
HSTS remains at the TLS terminator
---------
Co-authored-by: Pratapa Lakshmi <gouthampratapa8@gmail.com>
38 lines
591 B
Caddyfile
38 lines
591 B
Caddyfile
{
|
|
servers {
|
|
trusted_proxies static private_ranges
|
|
}
|
|
|
|
order rate_limit before file_server
|
|
}
|
|
|
|
:3000 {
|
|
root * /usr/share/caddy/html
|
|
|
|
# Per-client-IP rate limiting for static asset requests
|
|
rate_limit {
|
|
zone static {
|
|
key {client_ip}
|
|
events 300
|
|
window 1m
|
|
}
|
|
}
|
|
|
|
# Security headers (HSTS is set at the TLS terminator)
|
|
header {
|
|
X-Frame-Options "DENY"
|
|
X-Content-Type-Options "nosniff"
|
|
X-XSS-Protection "1; mode=block"
|
|
}
|
|
|
|
# SPA fallback
|
|
try_files {path} /index.html
|
|
file_server
|
|
|
|
# Access logs to stdout (default in Caddy)
|
|
log {
|
|
output stdout
|
|
format console
|
|
}
|
|
}
|