@hom3chuk/tektek
Version:
A library for detecting technologies used within HTTP Archive (HAR)
26 lines (25 loc) • 754 B
JavaScript
import { anyResourceHeaderContains, anyResourceUrlContains } from "../../common/index.js";
var detectAWSS3Server = function (har, asap) {
if (asap === void 0) { asap = true; }
var res = {
detected: false,
name: 'AWS S3 Server',
reasons: [],
};
if (anyResourceHeaderContains(har, 'server', 'amazons3')) {
res.detected = true;
res.reasons.push('server header mentions amazons3');
if (asap) {
return res;
}
}
if (anyResourceUrlContains(har, 's3.amazonaws.com/')) {
res.detected = true;
res.reasons.push('resource url contains s3 url');
if (asap) {
return res;
}
}
return res;
};
export default detectAWSS3Server;