UNPKG

@hom3chuk/tektek

Version:

A library for detecting technologies used within HTTP Archive (HAR)

42 lines (41 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var index_js_1 = require("../../common/index.js"); var detectJoomla = function (har, asap) { if (asap === void 0) { asap = true; } var res = { detected: false, name: 'Joomla!', reasons: [], }; if ((0, index_js_1.rootHeaderContains)(har, 'x-content-encoded-by', 'joomla')) { res.detected = true; res.reasons.push('x-content-encoded-by header mentions joomla'); if (asap) { return res; } } if ((0, index_js_1.rootHeaderContains)(har, 'x-powered-by', 'joomla')) { res.detected = true; res.reasons.push('x-powered-by header mentions joomla'); if (asap) { return res; } } if ((0, index_js_1.rootHeaderContains)(har, 'x-content-powered-by', 'joomla')) { res.detected = true; res.reasons.push('x-content-powered-by header mentions joomla'); if (asap) { return res; } } if ((0, index_js_1.anyResourceUrlContains)(har, '/media/jui/js/')) { res.detected = true; res.reasons.push('resource url contains jui js url'); if (asap) { return res; } } return res; }; exports.default = detectJoomla;