Files
netris-nestri/infra/cdn.ts
2025-06-18 13:40:55 +03:00

18 lines
405 B
TypeScript

import { domain } from "./dns";
import { storage } from "./storage";
export const cdn = new sst.aws.Router("CDNRouter", {
routes: {
"/*": {
bucket: storage,
rewrite: {
regex: "^/([a-zA-Z0-9_-]+)$",
to: "/public/$1"
},
},
},
domain: {
name: "cdn." + domain,
dns: sst.cloudflare.dns()
}
});