-
Notifications
You must be signed in to change notification settings - Fork 3.2k
refactor: migrate from nginx to Caddy for admin and web services #8338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: preview
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| servers { | ||
| trusted_proxies static 0.0.0.0 | ||
| } | ||
| } | ||
|
|
||
| :3000 { | ||
| root * /usr/share/caddy/html | ||
| try_files {path} /index.html | ||
| file_server | ||
|
|
||
| # Access logs to stdout (default in Caddy) | ||
| log { | ||
| output stdout | ||
| format console | ||
| } | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| servers { | ||
| trusted_proxies static 0.0.0.0 | ||
| } | ||
| } | ||
|
|
||
| :3000 { | ||
| root * /usr/share/caddy/html | ||
| try_files {path} /index.html | ||
| file_server | ||
|
|
||
| # Access logs to stdout (default in Caddy) | ||
| log { | ||
| output stdout | ||
| format console | ||
| } | ||
| } | ||
|
Comment on lines
+1
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, check if the Caddyfile exists and view its content
find . -name "Caddyfile" -type fRepository: makeplane/plane Length of output: 114 🏁 Script executed: # Search for Docker build configurations that might contain xcaddy with ratelimit
find . -name "Dockerfile*" -type f | head -20Repository: makeplane/plane Length of output: 399 🏁 Script executed: # Look for any rate_limit directives in the codebase
rg "rate_limit" --type-listRepository: makeplane/plane Length of output: 448 🏁 Script executed: # Correct search for rate_limit directives
rg "rate_limit" --type caddyRepository: makeplane/plane Length of output: 88 🏁 Script executed: # View the Caddyfile being reviewed
cat -n ./apps/web/caddy/CaddyfileRepository: makeplane/plane Length of output: 400 🏁 Script executed: # Check the Docker build config for the web app
cat -n ./apps/web/Dockerfile.web | head -50Repository: makeplane/plane Length of output: 2194 🏁 Script executed: # Look for xcaddy or ratelimit references in Docker files
rg "xcaddy|ratelimit|caddy-ratelimit" DockerfileRepository: makeplane/plane Length of output: 109 🏁 Script executed: # Search for xcaddy or ratelimit in all Dockerfiles
rg "xcaddy|ratelimit|caddy-ratelimit" ./apps/web/Repository: makeplane/plane Length of output: 177 🏁 Script executed: # Check the full web Dockerfile.web
cat -n ./apps/web/Dockerfile.web | tail -50Repository: makeplane/plane Length of output: 1817 🏁 Script executed: # Search the admin Caddyfile for comparison
cat -n ./apps/admin/caddy/CaddyfileRepository: makeplane/plane Length of output: 400 🏁 Script executed: # Search for any rate_limit in all files
rg "rate_limit"Repository: makeplane/plane Length of output: 998 🏁 Script executed: # Check Caddy documentation or configuration context - look for comments or related config
rg "trusted_proxies|X-Forwarded" --context 3Repository: makeplane/plane Length of output: 1770 🏁 Script executed: # Check if there's any rate_limit usage or configuration elsewhere in the web app
rg "rate_limit" ./apps/web/Repository: makeplane/plane Length of output: 41 🏁 Script executed: # Check if the PR or any related docs mention rate limiting intent
find . -name "*.md" -type f | xargs rg -l "rate" 2>/dev/null | head -10Repository: makeplane/plane Length of output: 432 🏁 Script executed: # Check for any rate_limit directives in Caddyfiles
rg "rate_limit" ./apps/*/caddy/Repository: makeplane/plane Length of output: 41 🏁 Script executed: # Check git history or comments around the xcaddy ratelimit addition
git log --oneline --all -- "**/Dockerfile.web" | head -20Repository: makeplane/plane Length of output: 1365 🏁 Script executed: # Look at proxy Caddyfile to understand the architecture better
cat -n ./apps/proxy/Caddyfile.ceRepository: makeplane/plane Length of output: 1099 Revisit
🤖 Prompt for AI Agents |
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: makeplane/plane
Length of output: 174
🏁 Script executed:
Repository: makeplane/plane
Length of output: 174
🏁 Script executed:
Repository: makeplane/plane
Length of output: 114
🏁 Script executed:
Repository: makeplane/plane
Length of output: 400
🏁 Script executed:
Repository: makeplane/plane
Length of output: 400
🏁 Script executed:
Repository: makeplane/plane
Length of output: 4143
Admin SPA fallback for
/god-modeis broken — requests to nested routes will failWith
root * /usr/share/caddy/htmland the admin build copied to/usr/share/caddy/html/god-mode, requests like/god-mode/projects/123will attempt to fall back to/usr/share/caddy/html/index.htmlinstead of/usr/share/caddy/html/god-mode/index.html. Since the latter directory exists but the former does not in this container, deep-linked admin routes will fail. Fix this by updating the fallback path:Additional issues:
trusted_proxies static 0.0.0.0effectively trusts all IPv4 client addresses. Constrain this to your actual proxy/load-balancer IP ranges or remove it if not needed.rate_limitdirective is configured in the Caddyfile, leaving it unused.📝 Committable suggestion
🤖 Prompt for AI Agents