mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 16:55:37 +02:00
18 lines
405 B
TypeScript
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()
|
|
}
|
|
}); |