mirror of
https://github.com/direct-img/direct-img.link.git
synced 2026-10-29 07:24:52 +00:00
Static assets don't count toward the free plan's 100,000 requests a day, so a daily GitHub Action promotes the most viewed images (by Cloudflare analytics) from R2 into public/ before deploying, and reports to ntfy. Zone rules fold the site and ?i= into the path, since static files ignore query strings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
544 B
Plaintext
15 lines
544 B
Plaintext
# Promoted images (scripts/promote.js) have no file extension, so they'd go out without a Content-Type. Browsers detect
|
|
# JPEG, PNG, GIF and WebP from the bytes whatever type is declared, so promote.js promotes only those.
|
|
/web/*
|
|
Content-Type: image/jpeg
|
|
Cache-Control: public, max-age=604800
|
|
Access-Control-Allow-Origin: *
|
|
/free/*
|
|
Content-Type: image/jpeg
|
|
Cache-Control: public, max-age=604800
|
|
Access-Control-Allow-Origin: *
|
|
/ai/*
|
|
Content-Type: image/jpeg
|
|
Cache-Control: public, max-age=604800
|
|
Access-Control-Allow-Origin: *
|