Zero-I/O IP Ban Shield & Pure Go Image Resampling: Asset Management in Practice

Oversized images slowing first-contentful paint and malicious scraping draining package download bandwidth are two of the biggest post-launch headaches. cms studio solves both cleanly through its Pure Go Image Optimization kernel and Asset File Repository.

1. Pure Go Bilinear Resampling & Immutable Physical Paths

Built on golang.org/x/image/draw for high-fidelity bilinear resampling with zero C library dependencies, the media core enforces two strict engineering rules:

  • Scale-Down Only: Images are proportionally downscaled only when exceeding width thresholds—never upscaled into blurry artifacts.
  • Logical Rename, Immutable Disk Path: Display names can be edited anytime, while disk paths stay immutable forever so historical posts and CDN links never 404.

Paired with the Image Optimizer plugin, admins can compare before/after sizes in a single-URL sandbox and even run atomic in-place overwrites across existing media while keeping every URL intact.

2. Asset File Repository & Nanosecond IP Ban Shield

For installers, patches, firmware, and whitepapers, the File Repository provides /d/{slug} short download links with SHA256 verification and 24h / 30d / 12m time-series charts.

When abusive scrapers appear in the Top 50 Download IPs leaderboard, admins can block them in one click. Enforcement runs directly in a concurrency-safe sync.Map memory blacklist (resolving real client IPs behind X-Forwarded-For / X-Real-IP), returning 403 Forbidden in $O(1)$ time with zero disk I/O overhead.