Skip to content

Commit

Permalink
Added more request id header support
Browse files Browse the repository at this point in the history
Added request-id Support for:
* Oracle Cloud
* MS Azure
* Google Cloud

Signed-off-by: Akama Aka <akama.aka@akami-solutions.cc>
  • Loading branch information
akama-aka authored Jun 11, 2024
1 parent 53388ee commit 47e2ea5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = async function (fastify, opts) {
console.error(err);
}
// Inject the CloudFlare Ray ID
let res = data.replace("__implement-ray-id__", req.headers["cf-ray"] || req.headers["X-Amz-Cf-Id"] || req.headers["akamai-x-get-request-id"] || req.id);
let res = data.replace("__implement-ray-id__", req.headers["cf-ray"] || req.headers["X-Amz-Cf-Id"] || req.headers["akamai-x-get-request-id"] || req.headers["x-appengine-request-log-id"] || req.headers["requestId"] || req.headers["opc-request-id"] || req.id);
// Inject the JavaScript Sources at the bottom of the Body
res = res.replace('__implement_body_script__', '<!--Implement Body Scripts--><script src="/'+path_name+'/js/bootstrap.bundle.min.js"></script>');
// Inject the Styling
Expand Down Expand Up @@ -144,4 +144,4 @@ module.exports = async function (fastify, opts) {
}
}
})
}
}

0 comments on commit 47e2ea5

Please sign in to comment.