-
Notifications
You must be signed in to change notification settings - Fork 0
Update netlify.toml #119
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?
Update netlify.toml #119
Conversation
✅ Deploy Preview for dtp-stat ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughA new redirect rule has been introduced in the Netlify configuration to proxy all requests from the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Netlify
participant ExternalAPI as cms.dtp-stat.ru
User->>Netlify: Request /api/some-path
Netlify->>ExternalAPI: Proxy /api/some-path to https://cms.dtp-stat.ru/api/some-path
ExternalAPI-->>Netlify: Response
Netlify-->>User: Response (status 200)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (1)
netlify.toml (1)
17-18: Expose only what you must – consider rate-limiting / CORS / auth in front of the CMSProxying raw requests to an external CMS may leak internal endpoints or invite abuse (e.g. automated scraping, DoS).
Confirm that the upstream API enforces authentication / rate limits, or add response-header rules (e.g.Cache-Control,Access-Control-Allow-Origin) to mitigate risk.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
netlify.toml(1 hunks)
🔇 Additional comments (1)
netlify.toml (1)
14-18: Forced rewrite will short-circuit all Netlify/Next.js API routes – verify this is intentional
force = truecombined withstatus = 200turns the rule into a rewrite that unconditionally grabs every request matching/api/*before the Next.js plugin gets a chance to serve its own/apiserverless functions.
If your Next.js project already contains API routes (or you plan to add any later) they will never execute – everything goes straight tohttps://cms.dtp-stat.ru.Please double-check that this behaviour is desired; removing
force = true(or narrowing thefrompattern, e.g./cms-api/*) keeps the external proxy while still allowing first-party endpoints to coexist.
Summary by CodeRabbit