Merge branch 'main' into ENG-2800

This commit is contained in:
x032205
2025-05-27 20:47:13 -04:00
4 changed files with 19 additions and 9 deletions

View File

@@ -60,12 +60,19 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
enterpriseAppConnections: false
});
export const setupLicenseRequestWithStore = (baseURL: string, refreshUrl: string, licenseKey: string) => {
export const setupLicenseRequestWithStore = (
baseURL: string,
refreshUrl: string,
licenseKey: string,
region?: string
) => {
let token: string;
const licenseReq = axios.create({
baseURL,
timeout: 35 * 1000
// signal: AbortSignal.timeout(60 * 1000)
timeout: 35 * 1000,
headers: {
"x-region": region
}
});
const refreshLicense = async () => {

View File

@@ -77,13 +77,15 @@ export const licenseServiceFactory = ({
const licenseServerCloudApi = setupLicenseRequestWithStore(
appCfg.LICENSE_SERVER_URL || "",
LICENSE_SERVER_CLOUD_LOGIN,
appCfg.LICENSE_SERVER_KEY || ""
appCfg.LICENSE_SERVER_KEY || "",
appCfg.INTERNAL_REGION
);
const licenseServerOnPremApi = setupLicenseRequestWithStore(
appCfg.LICENSE_SERVER_URL || "",
LICENSE_SERVER_ON_PREM_LOGIN,
appCfg.LICENSE_KEY || ""
appCfg.LICENSE_KEY || "",
appCfg.INTERNAL_REGION
);
const syncLicenseKeyOnPremFeatures = async (shouldThrow: boolean = false) => {

View File

@@ -245,7 +245,6 @@ const envSchema = z
DATADOG_HOSTNAME: zpStr(z.string().optional()),
/* CORS ----------------------------------------------------------------------------- */
CORS_ALLOWED_ORIGINS: zpStr(
z
.string()
@@ -255,7 +254,6 @@ const envSchema = z
return JSON.parse(val) as string[];
})
),
CORS_ALLOWED_HEADERS: zpStr(
z
.string()
@@ -264,7 +262,10 @@ const envSchema = z
if (!val) return undefined;
return JSON.parse(val) as string[];
})
)
),
/* INTERNAL ----------------------------------------------------------------------------- */
INTERNAL_REGION: zpStr(z.enum(["us", "eu"]).optional())
})
// To ensure that basic encryption is always possible.
.refine(

View File

@@ -130,7 +130,7 @@ The CLI is designed for a variety of secret management applications ranging from
export INFISICAL_CUSTOM_HEADERS="Access-Client-Id=your-client-id Access-Client-Secret=your-client-secret"
# Execute Infisical commands after setting the environment variable
infisical secrets ls
infisical secrets
```
This functionality enables secure interaction with Infisical instances that require specific authentication headers.