Ajustes
This commit is contained in:
@@ -37,6 +37,14 @@ export function getCurrentProjectInfo() {
|
||||
|
||||
export async function callLocalFileEndpoint(method, endpoint, payload = null, query = null) {
|
||||
const headers = getLocalServerHeaders();
|
||||
const authHeader = process.env.ACAI_AUTH_HEADER || "";
|
||||
const mode = process.env.ACAI_MODE_OVERRIDE || process.env.ACAI_MODE || "";
|
||||
const role = process.env.ACAI_ROLE_OVERRIDE || "";
|
||||
|
||||
if (authHeader) headers["Authorization"] = authHeader;
|
||||
if (mode) headers["X-Acai-Mode"] = mode;
|
||||
if (role) headers["X-Acai-Role"] = role;
|
||||
|
||||
// Inyectar X-Acai-User cuando hay sesion HTTP activa: permite que los
|
||||
// endpoints autenticados del server Python identifiquen al usuario sin
|
||||
// depender de Authorization Basic.
|
||||
|
||||
Reference in New Issue
Block a user