Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[build]
command = "npm run build"
publish = "dist/portfolio/browser"
Comment on lines +1 to +3

[[redirects]]
from = "/api/*"
to = "https://kamycoding-api.apps.apply.build/api/:splat"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve client IPs before proxying the rate-limited API

When the site uses this Netlify rewrite, the upstream TCP peer seen by Express is a Netlify proxy rather than the browser. The backend does not configure trust proxy or otherwise extract a validated client address, while the limiter in server/src/app.ts:43-52 uses its default IP key. Consequently, visitors routed through the same Netlify egress address share the five-request-per-15-minute contact limit and can block one another. Configure the backend to trust the known proxy chain or explicitly derive a validated client IP before routing production traffic through this proxy.

Useful? React with 👍 / 👎.

status = 200
force = true
Comment on lines +5 to +9

[[redirects]]
from = "/*"
to = "/index.html"
status = 200