Fix 404 page
This commit is contained in:
parent
6f85fafa6a
commit
e1d17b9345
4 changed files with 2309 additions and 2475 deletions
6
index.js
6
index.js
|
|
@ -12,7 +12,7 @@ import dotenv from "dotenv-flow";
|
|||
import wisp from "wisp-server-node";
|
||||
import router from "./middleware/ProxyExt/index.js";
|
||||
import { handler as astroSSR } from "./dist/server/entry.mjs";
|
||||
import cookies from "cookie-parser"
|
||||
import cookies from "cookie-parser";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ const rh = rammerhead.createRammerhead({
|
|||
const app = express();
|
||||
app.use(astroSSR);
|
||||
|
||||
app.use(cookies())
|
||||
app.use(cookies());
|
||||
|
||||
// Set process.env.MASQR_ENABLED to "true" to enable masqr protection.
|
||||
if (MASQR_ENABLED == "true") {
|
||||
|
|
@ -112,7 +112,7 @@ app.get("/search", async (req, res) => {
|
|||
}
|
||||
});
|
||||
app.get("*", (req, res) => {
|
||||
res.sendFile(path.join(process.cwd(), "dist/client/404.html"));
|
||||
res.redirect(302, "/404");
|
||||
});
|
||||
|
||||
const server = createServer();
|
||||
|
|
|
|||
18
package.json
18
package.json
|
|
@ -13,30 +13,30 @@
|
|||
"lint:fix": "eslint --fix ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/node": "^8.3.2",
|
||||
"@astrojs/node": "^8.3.4",
|
||||
"@inox-tools/sitemap-ext": "^0.3.3",
|
||||
"@mercuryworkshop/bare-as-module3": "^2.2.2",
|
||||
"@mercuryworkshop/bare-mux": "^2.0.9",
|
||||
"@mercuryworkshop/epoxy-transport": "^2.1.11",
|
||||
"@mercuryworkshop/libcurl-transport": "^1.3.10",
|
||||
"@rubynetwork/rammerhead": "^1.3.2",
|
||||
"@titaniumnetwork-dev/ultraviolet": "^3.2.6",
|
||||
"@titaniumnetwork-dev/ultraviolet": "^3.2.7",
|
||||
"@tomphttp/bare-server-node": "^2.0.4",
|
||||
"@types/node": "^20.14.12",
|
||||
"astro": "^4.12.2",
|
||||
"@types/node": "^20.16.9",
|
||||
"astro": "^4.15.9",
|
||||
"chalk": "^5.3.0",
|
||||
"cookie-parser": "^1.4.6",
|
||||
"dotenv-flow": "^4.1.0",
|
||||
"express": "^4.19.2",
|
||||
"express": "^4.21.0",
|
||||
"notyf": "^3.10.0",
|
||||
"sequelize": "^6.37.3",
|
||||
"sqlite3": "^5.1.7",
|
||||
"wisp-server-node": "^1.1.4"
|
||||
"wisp-server-node": "^1.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
||||
"@typescript-eslint/parser": "^7.17.0",
|
||||
"eslint": "^8.57.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
||||
"@typescript-eslint/parser": "^7.18.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-plugin-astro": "^0.31.4",
|
||||
"prettier": "3.2.5",
|
||||
"prettier-plugin-astro": "^0.13.0"
|
||||
|
|
|
|||
4754
pnpm-lock.yaml
generated
4754
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue