DEV Community

Hardening Browser Perception: How We Made Wizang EYES Ready for Production Design Partners

When building developer infrastructure, the most common trap is feature creep.

Before onboarding design partners from AI agent startups and enterprise teams, we halted feature expansion for Mission 01: Product Hardening.

If Stripe, Browserbase, or an AI agent company evaluated our API tomorrow, what would prevent them from integrating it into production?

Here is the engineering overhaul we executed.


1. Enterprise Security & SSRF Protection

Browser agents are vulnerable to Server-Side Request Forgery (SSRF). An agent receiving malicious prompt injections could instruct the browser engine to probe:

  • http://169.254.169.254 (AWS/GCP metadata endpoints)
  • http://127.0.0.1:8000 (Local service ports)
  • Private subnet IPs (10.0.0.0/8, 192.168.0.0/16)

We built a strict security validation middleware in that resolves domain DNS records, verifies IP address blocks against RFC 1918/3927/4193 standards, and rejects private target routing with standardized SSRF_BLOCKED errors before a request.


2. Memory Drift & Browser Context Recycling

Headless Browsers processes leak memory when running thousands of consecutive navigations.

  • We implemented an automated context recycling layer.
  • Browser contexts are recycled after 50 executions.
  • Deep health-check pings continuously monitor browser connectivity and auto-recover crashed daemon instances without dropping active requests.

3. Standardization & Tracing

  • RFC 7807 Error Schema: Every failure returns standardized error envelopes with unique request_id tracing.
  • Prometheus Telemetry & /metrics: Live tracking of average latency, active pool size, and request distribution.

Results confirmed:

  • Pool Acquisition: 0.1ms
  • JS Extraction: 10–25ms
  • Element Precision: 100% deterministic coordinate resolution

Infrastructure should be boring, resilient, and blazing fast.

Check the live API: https://wizang-eyes.onrender.com/docs

Top comments (0)