Skip to content

Commit

Permalink
Fix 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
3kh0 committed Sep 26, 2024
1 parent 6f85faf commit e1d17b9
Show file tree
Hide file tree
Showing 4 changed files with 2,274 additions and 2,440 deletions.
6 changes: 3 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const site = prodBuild ? "https://aluu.xyz" : "http://localhost:3000";
export default defineConfig({
site: site,
integrations: [
sitemap({
includeByDefault: true,
sitemap({
includeByDefault: true,
lastmod: new Date(),
}),
}),
],
output: "server",
adapter: node({
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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") {
Expand Down Expand Up @@ -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();
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit e1d17b9

Please sign in to comment.