mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-14 08:19:51 +02:00
use pangolin-key prefix for virtual api keys
This commit is contained in:
@@ -62,11 +62,6 @@ function parseVkCredential(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Extract a virtual API key credential from provider-style auth headers.
|
|
||||||
* Checks Authorization Bearer / Splunk, x-api-key, x-goog-api-key, and
|
|
||||||
* cf-aig-authorization. First matching vk-{id}.{secret} wins.
|
|
||||||
*/
|
|
||||||
export function extractVirtualApiKeyCredential(
|
export function extractVirtualApiKeyCredential(
|
||||||
headers: Record<string, string> | undefined
|
headers: Record<string, string> | undefined
|
||||||
): VirtualApiKeyCredential | null {
|
): VirtualApiKeyCredential | null {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export const VIRTUAL_API_KEY_PREFIX = "vk-";
|
export const VIRTUAL_API_KEY_PREFIX = "pangolin-key-";
|
||||||
|
|
||||||
const VIRTUAL_API_KEY_AUTH_HEADER_NAMES = [
|
const VIRTUAL_API_KEY_AUTH_HEADER_NAMES = [
|
||||||
"authorization",
|
"authorization",
|
||||||
|
|||||||
Reference in New Issue
Block a user