CORS (Cross-Origin Resource Sharing) Explained

What is CORS? CORS (Cross-Origin Resource Sharing) is a browser security mechanism that controls which websites can make API calls to other domains. What is an Origin? Origin = Protocol + Domain + Port https://example.com:443 ↑ ↑ ↑ Protocol Domain Port Same-Origin Examples: Origin 1: https://example.com/page1 Origin 2: https://example.com/page2 → Same origin ✓ Cross-Origin Examples: Origin 1: https://example.com Origin 2: https://api.example.com → Different domain = Cross-origin ✗ Origin 1: https://example.com Origin 2: http://example.com → Different protocol = Cross-origin ✗ Origin 1: https://example.com:443 Origin 2: https://example.com:8080 → Different port = Cross-origin ✗ Why CORS Exists Without CORS: ...

November 28, 2025 · 7 min · Ren Nishino

curl and openssl Flow Through Corporate Proxy with SSL Inspection

What is Corporate Proxy with SSL Inspection? Corporate proxies intercept HTTPS traffic to inspect content for security and compliance. This is called SSL Inspection or MITM (Man-In-The-Middle). Complete Flow: curl Through Proxy Command: curl -v -x http://proxy.company.com:8080 https://api.example.com/data Step-by-Step Flow: 1. DNS Resolution curl resolves proxy hostname ↓ DNS: proxy.company.com → 192.168.1.100 2. TCP Connection to Proxy curl → proxy:8080 ↓ TCP handshake: SYN, SYN-ACK, ACK ↓ Connection established 3. CONNECT Request (HTTP Tunnel) curl sends: → CONNECT api.example.com:443 HTTP/1.1 → Host: api.example.com → User-Agent: curl/8.0.0 → Proxy-Connection: Keep-Alive Proxy responds: ← HTTP/1.1 200 Connection established Key point: CONNECT doesn’t create new TCP connection - it repurposes existing connection as tunnel. ...

November 28, 2025 · 5 min · Ren Nishino

HAR File Format - Understanding Browser Network Logs

What is HAR File? HAR (HTTP Archive) is a JSON format for recording browser HTTP transactions. Created by exporting from Browser DevTools Network tab. How to Create HAR File Chrome/Edge: 1. F12 → Network tab 2. Reload page or perform action 3. Right-click any request 4. "Save all as HAR with content" Firefox: 1. F12 → Network tab 2. Click gear icon → "Save All As HAR" HAR File Structure Overview { "log": { "version": "1.2", "creator": { ... }, "browser": { ... }, "pages": [ ... ], "entries": [ ... ] } } Complete HAR Structure Root Object { "log": { "version": "1.2", "creator": { "name": "WebInspector", "version": "537.36", "comment": "" }, "browser": { "name": "Chrome", "version": "142.0.0.0", "comment": "" }, "pages": [ { "startedDateTime": "2025-11-28T10:30:45.123Z", "id": "page_1", "title": "Example Page", "pageTimings": { "onContentLoad": 1234.5, "onLoad": 2345.6 } } ], "entries": [ { "pageref": "page_1", "startedDateTime": "2025-11-28T10:30:45.123Z", "time": 308.5, "request": { ... }, "response": { ... }, "cache": { ... }, "timings": { ... }, "serverIPAddress": "192.168.1.100", "connection": "443", "_initiator": { ... }, "_priority": "High", "_resourceType": "fetch" } ] } } log Object Top-level container for all HAR data. ...

November 28, 2025 · 11 min · Ren Nishino