From e3133f28d486cc95735e4d9925e7f323a92600f0 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Fri, 23 Feb 2024 10:07:09 -0600 Subject: [PATCH] add suika combination --- index.js | 6 ++++++ package-lock.json | 9 +++++++++ package.json | 1 + public/games | 2 +- src/json/games.json | 5 +++++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c9f7e06..2118c02 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ import { build } from "astro"; import chalk from "chalk"; import { existsSync } from "fs"; import dotenv from "dotenv"; +import helmet from "helmet"; dotenv.config(); if (!existsSync("./dist")) build(); @@ -47,6 +48,11 @@ app.use( extended: true, }) ); +app.use(function(req, res, next) { + res.header("Cross-Origin-Embedder-Policy", "require-corp"); + res.header("Cross-Origin-Opener-Policy", "same-origin"); + next(); +}); app.use("/", express.static("dist/client/")); app.get("/search", async (req, res) => { try { diff --git a/package-lock.json b/package-lock.json index 578bd5d..de05d44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "compression": "^1.7.4", "dotenv": "^16.3.1", "express": "^4.18.2", + "helmet": "^7.1.0", "npm": "^10.2.5", "path": "^0.12.7", "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", @@ -3465,6 +3466,14 @@ "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.3.0.tgz", "integrity": "sha512-5e57etwBpNcDc0b6KCVWEh/Ro063OxPvzVimUdM0/tsYM/T7Hfy3kknIGj78SFTOhNd8AZY41U8mOHoO4LzmIQ==" }, + "node_modules/helmet": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-7.1.0.tgz", + "integrity": "sha512-g+HZqgfbpXdCkme/Cd/mZkV0aV3BZZZSugecH03kl38m/Kmdx8jKjBikpDj2cr+Iynv4KpYEviojNdTJActJAg==", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", diff --git a/package.json b/package.json index c3c7017..605926f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "compression": "^1.7.4", "dotenv": "^16.3.1", "express": "^4.18.2", + "helmet": "^7.1.0", "npm": "^10.2.5", "path": "^0.12.7", "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", diff --git a/public/games b/public/games index 11287d0..2e6cd67 160000 --- a/public/games +++ b/public/games @@ -1 +1 @@ -Subproject commit 11287d0a834c672a55d10164dbfefe9ee1922d3d +Subproject commit 2e6cd673ab519025af951713868860b7895b11b8 diff --git a/src/json/games.json b/src/json/games.json index c501e13..9ff7b73 100644 --- a/src/json/games.json +++ b/src/json/games.json @@ -214,6 +214,11 @@ "image": "/games/sort-the-court/logo.jpg", "slug": "sort-the-court" }, + "suika-combination": { + "name": "Suika Combination", + "image": "/games/suika-combination/logo.png", + "slug": "suika-combination" + }, "superhot": { "name": "Superhot", "image": "/games/superhot/logo.png",