1
0
Fork 0
forked from svrjs/svrjs

Fix bug with "ext" variable passed to .tar.gz mod handler

This commit is contained in:
Dorian Niemiec 2024-08-28 18:28:07 +02:00
parent 82b0510774
commit a33a86ee62

View file

@ -13,7 +13,8 @@ module.exports = (legacyMod) => {
let middleware = (req, res, logFacilities, config, next) => {
let ext = req.parsedURL.pathname.match(/[^/]\.([^.]+)$/);
if (!ext) ext = "";
else ext = ext[1].toLowerCase();
// Function to parse incoming POST data from the request
const parsePostData = (options, callback) => {
// If the request method is not POST, return a 405 Method Not Allowed error