Files
portkey-ai--gateway/plugins/pillar/globals.ts
T
wehub-resource-sync 3cd11ababe
Check Markdown links / linkChecker (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:38:56 +08:00

26 lines
629 B
TypeScript

import { post } from '../utils';
export const PILLAR_BASE_URL = 'https://api.pillarseclabs.com/api/v1';
export const postPillar = async (
endpoint: string,
credentials: any,
data: any,
timeout?: number
) => {
const options = {
headers: {
Authorization: `Bearer ${credentials.apiKey}`,
},
};
switch (endpoint) {
case 'scanPrompt':
return post(`${PILLAR_BASE_URL}/scan/prompt`, data, options, timeout);
case 'scanResponse':
return post(`${PILLAR_BASE_URL}/scan/response`, data, options, timeout);
default:
throw new Error(`Unknown Pillar endpoint: ${endpoint}`);
}
};