Public
Remixed
A reverse proxy mirror of svgrepo.com with redirect handling
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

svgrepo-mirror

A reverse proxy that mirrors svgrepo.com exactly — including redirects, cookies, and all content types.

Live URL: https://svgrepo-mirror.val.run

How it works

Every request to the mirror is forwarded to https://www.svgrepo.com with:

  • Same path & query string/vectors/cats/?page=2 maps to svgrepo.com/vectors/cats/?page=2
  • Same HTTP method & body — GET, POST, PUT, DELETE, PATCH all work
  • Browser-like headers — User-Agent, Accept, sec-fetch-*, sec-ch-ua sent to avoid bot detection
  • Redirects preserved — 3xx responses are passed through with Location headers rewritten to point back through the mirror
  • Cookies forwarded — Set-Cookie headers are cleaned (domain/secure removed) so they work on the mirror domain
  • URL rewriting — Absolute URLs in HTML/CSS/JS/JSON/SVG content are rewritten from www.svgrepo.com to the mirror origin
  • Binary passthrough — Images, fonts, and other binary content pass through unchanged

Vercel Security Checkpoint

svgrepo.com is hosted on Vercel and uses bot protection. Server-side requests (like our proxy's fetch) receive a 429 challenge page that requires JavaScript execution to solve.

When you visit the mirror in a real browser:

  1. Browser receives the challenge page (with URLs rewritten to the mirror)
  2. Browser executes the challenge JavaScript, which POSTs the solution through the proxy
  3. Vercel sets a verification cookie (cleaned to work on the mirror domain)
  4. Browser reloads → proxy forwards the cookie → Vercel returns the real content
  5. All subsequent requests work seamlessly

Architecture

main.tsx    — HTTP handler: forwards requests, processes responses
rewrite.ts  — URL rewriting utilities (Location headers + content body)