mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 14:27:30 +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) {
|
export function providerSpecificPayload(url: string) {
|
||||||
const payload: Record<string, string> = {};
|
const payload: Record<string, string> = {};
|
||||||
|
|
||||||
// If URL is related to DataDog, add a "ddsource: infisical" entry
|
// If URL is for DataDog, add a "ddsource: infisical" entry
|
||||||
if (url.includes("datadoghq")) {
|
if (
|
||||||
|
dataDogHostnames.some((hostname) => url.startsWith(`https://${hostname}`) || url.startsWith(`http://${hostname}`))
|
||||||
|
) {
|
||||||
payload.ddsource = "infisical";
|
payload.ddsource = "infisical";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user