full site update
This commit is contained in:
9
node_modules/astro/dist/vite-plugin-astro-server/base.js
generated
vendored
9
node_modules/astro/dist/vite-plugin-astro-server/base.js
generated
vendored
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { appendForwardSlash } from "@astrojs/internal-helpers/path";
|
||||
import { bold } from "kleur/colors";
|
||||
import notFoundTemplate, { subpathNotUsedTemplate } from "../template/4xx.js";
|
||||
import { notFoundTemplate, subpathNotUsedTemplate } from "../template/4xx.js";
|
||||
import { writeHtmlResponse } from "./response.js";
|
||||
function baseMiddleware(settings, logger) {
|
||||
const { config } = settings;
|
||||
@@ -27,12 +27,7 @@ function baseMiddleware(settings, logger) {
|
||||
return writeHtmlResponse(res, 404, html);
|
||||
}
|
||||
if (req.headers.accept?.includes("text/html")) {
|
||||
const html = notFoundTemplate({
|
||||
statusCode: 404,
|
||||
title: "Not found",
|
||||
tabTitle: "404: Not Found",
|
||||
pathname
|
||||
});
|
||||
const html = notFoundTemplate(pathname);
|
||||
return writeHtmlResponse(res, 404, html);
|
||||
}
|
||||
const publicPath = new URL("." + req.url, config.publicDir);
|
||||
|
Reference in New Issue
Block a user