-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or requestneeds-votesA feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.
Description
Related to #29.
This is what works now:
const { EleventyServerlessBundlerPlugin } = require("@11ty/eleventy");
module.exports = function(eleventyConfig) {
eleventyConfig.setServerOptions({
middleware: [function overrideMiddleware(req, res, next) {
// This works now
res.writeHead(200, {"content-type": "text/html"}); // content-type header required for live-reload
res.write("Before Text");
res.end();
next();
}],
});
});However, I’d like to see folks able to consume res.statusCode (404 when no file is present) and res.body with the static content to do request-time content transforms
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestneeds-votesA feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.