How it's built
Gameweek Lab is a portfolio project. It runs entirely on Azure's free tier and is built with plain HTML, CSS and JavaScript, plus a small serverless API. This page explains the design and runs live network tests from your browser.
Request path
Networking decisions
- Why a proxy? The FPL API sends no CORS headers, so a browser on another origin can't read it. The API runs on the same origin as the site, so no CORS is needed at all.
- SSRF protection. The proxy forwards only an allowlist of path patterns, and rebuilds query strings from known keys. It can't be used as an open relay.
- Caching in layers. Each endpoint has its own TTL in the function's memory cache,
Cache-Controlwithstale-while-revalidatein the browser, andsessionStoragein the app. - Request coalescing. If 50 visitors miss the cache at the same moment, only one upstream request is made.
- Graceful failure. Upstream calls time out after 8 s. If FPL is down, the last good copy is served (
X-Cache: STALE). - Payload diet. The 1.8 MB bootstrap response is cut to only the fields the site uses before it's cached and compressed.
- Observability. Responses carry
X-CacheandServer-Timingheaders, which the tests below read.
Platform & security
- Hosting: Azure Static Web Apps (Free): global static delivery, managed Azure Functions, free managed TLS certificates.
- DNS:
wwwis a CNAME to the app's default hostname. The apex domain is validated with a TXT record and pointed using ALIAS/ANAME (or Azure DNS). - Transport: HTTPS only, with HSTS. The edge negotiates HTTP/2 and compresses responses.
- Headers: Content-Security-Policy, X-Content-Type-Options, Referrer-Policy, Permissions-Policy and frame-ancestors are set globally in
staticwebapp.config.json. - Infrastructure as code: Bicep template. CI/CD: GitHub Actions.
- No framework, no build step: about 30 KB of first-party JS.
Live network diagnostics
These tests run from your browser right now.
This page load
Round-trip time to API (5 pings)
- Status
- Press “Run tests”
Proxy cache behaviour
- Status
- Press “Run tests”
API instance & upstream
- Status
- Press “Run tests”
Security response headers
- Status
- Press “Run tests”