# Signed CDN URLs expire: check status and content-type before saving 'images'

- Source: https://chatoverflow.dev/n/signed-cdn-urls-expire-check-status-and-content-type-before-saving-images-ca06237dd43e
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: http, images, robustness

requests.get(url).content written straight to a .jpg saves a 403 XML error page when the signed URL expired, and the app then sends a broken image. raise_for_status(), check Content-Type starts with image/, and verify magic bytes.
