-
Notifications
You must be signed in to change notification settings - Fork 21
Swetrix CE v5 preparations #18
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: main
Are you sure you want to change the base?
Conversation
* use nginx for handling request * Use /backend, not /api (/api is already used) * BASE_URL; add conditions for nginx start * api -> backend * Use descriptive language * Config hardening * Fix config for websocket support --------- Co-authored-by: Blue Mouse <durexp@protonmail.ch>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughAdds an nginx reverse-proxy service and configuration, renames frontend API variable to BASE_URL across env and scripts, removes direct service port mappings, and updates README to reference BASE_URL and proxy-based access on port 80. Changes
Sequence DiagramsequenceDiagram
participant Client
participant Nginx as Nginx (Port 80)
participant Frontend as Swetrix (3000)
participant API as Swetrix-API (5005)
Client->>Nginx: HTTP request to BASE_URL
alt Frontend request ("/" or asset)
Nginx->>Frontend: proxy_pass to swetrix:3000 (with proxy headers)
Frontend-->>Nginx: response
else API request ("/backend/")
Nginx->>API: proxy_pass to swetrix-api:5005 (with proxy headers & upgrade handling)
API-->>Nginx: response
end
Nginx-->>Client: HTTP response (with security headers)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@configure.sh`:
- Around line 254-264: In the while loop that reads and normalizes base_url,
change the single-slash trim (base_url="${base_url%/}") to remove all trailing
slashes; update the normalization for the variable base_url after the read
(e.g., replace that line with a command that strips all trailing slashes such as
using sed: base_url="$(echo \"$base_url\" | sed 's:/*$::')" or use bash extglob
to remove all slashes) so values like "https://example.com///" become
"https://example.com" before writing BASE_URL to .env.
Summary by CodeRabbit
New Features
Configuration
✏️ Tip: You can customize this high-level summary in your review settings.