mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Improve URL detection
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
// Specific DataDog log intake hostnames
|
||||
const dataDogHostnames = [
|
||||
"http-intake.logs.datadoghq.com",
|
||||
"http-intake.logs.us3.datadoghq.com",
|
||||
"http-intake.logs.us5.datadoghq.com",
|
||||
"http-intake.logs.datadoghq.eu",
|
||||
"http-intake.logs.ap1.datadoghq.com",
|
||||
"http-intake.logs.ddog-gov.com"
|
||||
];
|
||||
|
||||
export function providerSpecificPayload(url: string) {
|
||||
const payload: Record<string, string> = {};
|
||||
|
||||
// If URL is related to DataDog, add a "ddsource: infisical" entry
|
||||
if (url.includes("datadoghq")) {
|
||||
// If URL is for DataDog, add a "ddsource: infisical" entry
|
||||
if (
|
||||
dataDogHostnames.some((hostname) => url.startsWith(`https://${hostname}`) || url.startsWith(`http://${hostname}`))
|
||||
) {
|
||||
payload.ddsource = "infisical";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user