diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-06-21 00:01:03 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-06-21 00:01:03 +0200 |
commit | 597ed292210acc785f2bec4438488cc29c304ee9 (patch) | |
tree | fb51de07198779d7c1c7c0ee7448f4206605c36c /build.js | |
parent | a069890e824f2f9b285d27de3149be0068b5eb10 (diff) | |
download | starshine-597ed292210acc785f2bec4438488cc29c304ee9.tar.gz starshine-597ed292210acc785f2bec4438488cc29c304ee9.tar.bz2 starshine-597ed292210acc785f2bec4438488cc29c304ee9.zip |
Make it work with GitHub
Diffstat (limited to 'build.js')
-rwxr-xr-x | build.js | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -4,8 +4,8 @@ const path = require('path'); const port = ("42" + Math.random().toString().split(".")[1]).substring(0, 5); -//console.log("Refreshing projects..."); -//.execSync("php refresh-projects.php", { stdio: "inherit", cwd: "includes" }); +console.log("Refreshing projects..."); +cp.execSync("php refresh-projects.php", { stdio: "inherit", cwd: "includes" }); console.log("Backing up .vercel..."); cp.execSync("mv ./out/.vercel ./.vercel"); @@ -55,6 +55,15 @@ let config = { ] }, { + source: "/security.txt", + headers: [ + { + key: "Content-Type", + value: "text/plain" + } + ] + }, + { source: "/announcement", headers: [ { @@ -182,6 +191,12 @@ let waiter = setInterval(async () => { fs.writeFileSync("./out/version", fs.readFileSync("./version")); fs.writeFileSync("./out/pubkey", fs.readFileSync("./pubkey")); fs.writeFileSync("./out/announcement", fs.readFileSync("./announcement")); + fs.writeFileSync("./out/security.txt", fs.readFileSync("./security.txt")); + + config['rewrites'].push({ + source: "/.well-known/security.txt", + destination: "/security.txt" + }); fs.writeFileSync("./out/vercel.json", JSON.stringify(config, null, 2)); process.stdout.clearLine(null); |