We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fc336c commit db73d26Copy full SHA for db73d26
1 file changed
app/spandx.js
@@ -84,14 +84,14 @@ async function init(confIn) {
84
85
if (_.get(conf, "esi")) {
86
console.log("ESI enabled");
87
- app.use((res, req, next) => {
+ app.use((req, res, next) => {
88
console.log("request received");
89
if (
90
- res.headers.accept.includes("text/html") ||
91
- res.headers.accept.includes("*/*")
+ req.headers.accept?.includes("text/html") ||
+ req.headers.accept?.includes("*/*")
92
) {
93
console.log("it is html; applying ESI");
94
- transformerProxy(createEsiMiddleware(conf))(res, req, next);
+ transformerProxy(createEsiMiddleware(conf))(req, res, next);
95
} else {
96
console.log("it is not html");
97
next();
0 commit comments