Skip to content

Commit

Permalink
fix: pass access headers to ai proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
RihanArfan committed Oct 29, 2024
1 parent fca6126 commit ce9707d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/ai/server/utils/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function hubAI(): Ai {
const binding = process.env.AI || globalThis.__env__?.AI || globalThis.AI
if (hub.remote && hub.projectUrl && !binding) {
const cfAccessHeaders = getCloudflareAccessHeaders(hub.cloudflareAccess)
_ai = proxyHubAI(hub.projectUrl, hub.projectSecretKey || hub.userToken)
_ai = proxyHubAI(hub.projectUrl, hub.projectSecretKey || hub.userToken, cfAccessHeaders)
} else if (import.meta.dev) {
// Mock _ai to call NuxtHub Admin API to proxy CF account & API token
_ai = {
Expand Down

0 comments on commit ce9707d

Please sign in to comment.