Skip to content

Step16: new analysis route (only url) + landing page#18

Merged
Parth576 merged 7 commits intomainfrom
step16
Mar 5, 2026
Merged

Step16: new analysis route (only url) + landing page#18
Parth576 merged 7 commits intomainfrom
step16

Conversation

@Parth576
Copy link
Owner

@Parth576 Parth576 commented Mar 1, 2026

No description provided.

Build a single-page static site at website/ with Tailwind CSS (CDN),
explaining the project, its scoring system, and linking to browser
extension install pages. Includes placeholder section for URL analysis
feature (task-03). Responsive design with pastel offwhite color palette.

Assisted by the code-assist SOP
… and rate limiting

Add server-side URL fetching endpoint that accepts a URL, fetches HTML content,
and runs it through the existing analysis pipeline. Includes:

- SSRF validator: blocks private IPs, loopback, link-local, non-HTTP schemes,
  with DNS resolution to prevent rebinding attacks
- Per-IP rate limiter: sliding window (5 req/min), returns 429 with Retry-After
- URL fetcher: configurable body size limit (5MB), redirect following with SSRF
  validation on each hop, content-type checking, descriptive error messages
  suggesting browser extension fallback
- Configurable CORS origins via CORS_ALLOWED_ORIGINS env var (default: *)
- Request type in types/request.go per coding standards

Assisted by the code-assist SOP
… display

Replace the try-it section placeholder with a functional URL analysis feature
that lets users paste a privacy policy URL and get scored results without
installing the browser extension. Includes client-side URL validation, loading
states, comprehensive error handling (network, fetch failure, rate limiting,
non-policy content), and responsive results rendering with risk-level color
coding matching the scoring system spec.

Assisted by the code-assist SOP
Add RATE_LIMIT_REQUESTS and RATE_LIMIT_WINDOW environment variables
to configure the per-IP rate limiter, defaulting to 5 requests per
minute to preserve existing behavior.
Both /analyze and /analyze-url now share the same per-IP rate limiter
so requests to either endpoint count toward a single budget.
@Parth576 Parth576 merged commit 323f1a7 into main Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant