PTEC Storage
The file-delivery service behind the PTEC Digital Library — a separate origin, a deny-by-default policy, and a landing page that says only what it is.

The problem
A digital library is only as good as its file delivery. Serving book scans and theses from the application itself ties download traffic to page traffic: one large file competes with every page render, and the caching strategy that suits a catalogue page — short revalidation, always current — is exactly the wrong one for a large PDF that never changes.
The approach
A dedicated origin, fronted by Cloudflare, that does one thing: serve the library's files. It is referenced by the library as both an asset host and an API origin, cached for static delivery, hardened to deny everything it does not need, and kept out of search results entirely.
What it does now
The service is live, delivers the PTEC Digital Library's assets from an origin of their own, and ships the most restrictive Content-Security-Policy of the three platforms in this portfolio. Volume figures are not published — none of them can be verified from outside.
300 s Public cache lifetime
Overview
PTEC Storage is the file-delivery layer for library.ptec.edu.kh. Its landing page states that and nothing else: "File delivery service for library.ptec.edu.kh. There is nothing to see here." No catalogue, no navigation, nothing to browse — and a noindex directive so it stays out of search results.
That is the whole design. This is infrastructure, and the most useful thing infrastructure can do is stay out of the way.
Who it is for
Directly, the library application. Indirectly, every reader of the PTEC Digital Library — none of whom ever sees this service by name.
Goals
One job, done narrowly: deliver the library's files over a separate origin, with caching and hardening tuned for static assets rather than for an application.
My role
I work on this service as part of the PTEC Digital Library platform, on the infrastructure side. Its internal design — storage backend, topology and operational tooling — is intentionally not published here.
Constraints
The service has no user interface to protect and no reason to be crawled. That is a constraint worth having: it allows the origin to be locked down far harder than an application ever could be.
UX decisions
There is exactly one interface decision, and it is to have almost no interface. The landing page names the service, names the site it serves, and says there is nothing else here — which is more useful to someone who lands on it by accident than either a redirect or a 404 would be.
Architecture
A separate origin from the library application, served through Cloudflare. The library treats it as two things at once and its Content-Security-Policy says so: storage-ptec.online and its subdomains are permitted image sources, and api.storage-ptec.online is a permitted connect-src origin. Splitting delivery from rendering lets the two be cached, scaled and hardened on their own terms.
Key features
This service is defined more by what it refuses than by what it offers.
Security
The policy is deny-by-default and the strictest of the three platforms: default-src 'none', img-src 'self', frame-ancestors 'none', base-uri 'none', form-action 'none' — no scripts, no framing, no forms, no base-tag rewriting. Alongside it: HSTS, X-Content-Type-Options nosniff, X-Frame-Options DENY, and a Permissions-Policy that switches off camera, microphone, geolocation, payment and USB. Because there is no UI to protect, everything that is not file delivery is simply turned off. Network error reporting is configured, so failures are visible rather than silent.
Accessibility
The landing page is one heading and one sentence in a system font stack at default sizes — legible without CSS and trivial for a screen reader to read out. There is nothing else on it to make accessible.
SEO
Deliberately invisible: the landing page is marked noindex. A file host has no business competing with the library it serves for that library's own search results.
Performance
Responses are cached publicly for five minutes and carry Last-Modified, so a repeat request revalidates cheaply instead of re-downloading. Accept-Ranges: bytes is advertised, which is what lets a reader resume an interrupted download or a viewer seek into a large PDF rather than fetching all of it first. Cloudflare fronts the origin, and HTTP/3 is advertised.
Challenges
Separating file delivery from an application is easy to describe and easy to get wrong. The split only pays off if the second origin is genuinely independent — its own caching, its own policy, its own failure mode — rather than a proxy that inherits the first one's constraints.
Key features
A delivery origin of its own
Files are served from a host separate from the library application, so download traffic and page rendering never compete for the same resources.
Deny-by-default security policy
default-src none, img-src self, frame-ancestors none, base-uri none, form-action none — the strictest policy of the three platforms.
Public caching with cheap revalidation
Responses are cached publicly for five minutes and carry Last-Modified, so a repeat request revalidates instead of re-downloading.
Range requests for large files
Accept-Ranges is advertised, so an interrupted download resumes and a viewer can seek into a large PDF without fetching all of it first.
Served from the Cloudflare edge
The origin sits behind Cloudflare with HTTP/3 advertised, which keeps delivery close to readers on Cambodian networks.
Deliberately not indexed
The landing page is marked noindex: a file host should not compete with the library it serves for that library's own search results.
Network error reporting
Reporting endpoints are configured, so delivery failures are observable rather than silent — which matters most for a service nobody looks at.
Measured results
Only figures with a recorded source are shown.
- 300s
- Public cache lifetime
- 4
- Fetch directives set to none
Read from the Cache-Control response header on the delivery origin.
Jul 2026
default-src, frame-ancestors, base-uri and form-action are all 'none' in the origin's Content-Security-Policy.
Jul 2026