mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Add OpenRouter app headers
This commit is contained in:
1 file changed
+5
@@ -16,6 +16,11 @@ export function createAIClient(connection: {
|
|||||||
baseURL: connection.baseURL,
|
baseURL: connection.baseURL,
|
||||||
apiKey: connection.apiKey ?? '',
|
apiKey: connection.apiKey ?? '',
|
||||||
dangerouslyAllowBrowser: true,
|
dangerouslyAllowBrowser: true,
|
||||||
|
defaultHeaders: {
|
||||||
|
// https://openrouter.ai/docs/app-attribution
|
||||||
|
'HTTP-Referer': 'https://shakespeare.diy',
|
||||||
|
'X-Title': 'Shakespeare',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// If Nostr authentication is required and we have a user, use NIP-98
|
// If Nostr authentication is required and we have a user, use NIP-98
|
||||||
|
|||||||
Reference in new issue
Block a user