Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion flagship/dist-deno/src/decision/DecisionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ export abstract class DecisionManager implements IDecisionManager {
visitor_consent: visitor.hasConsented
};

const url = `${this.config.decisionApiUrl || BASE_API_URL}${this.config.envId}${URL_CAMPAIGNS}?${EXPOSE_ALL_KEYS}=true&extras[]=accountSettings`;
// When using custom decisionApiUrl, assume it already includes the full path (e.g., /v2/campaigns)
// When using default BASE_API_URL, include envId in path for cloud compatibility
const url = this.config.decisionApiUrl
? `${this.config.decisionApiUrl}${URL_CAMPAIGNS}?${EXPOSE_ALL_KEYS}=true&extras[]=accountSettings`
: `${BASE_API_URL}${this.config.envId}${URL_CAMPAIGNS}?${EXPOSE_ALL_KEYS}=true&extras[]=accountSettings`;
const now = Date.now();

try {
Expand Down
6 changes: 5 additions & 1 deletion flagship/src/decision/DecisionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ export abstract class DecisionManager implements IDecisionManager {
visitor_consent: visitor.hasConsented
};

const url = `${this.config.decisionApiUrl || BASE_API_URL}${this.config.envId}${URL_CAMPAIGNS}?${EXPOSE_ALL_KEYS}=true&extras[]=accountSettings`;
// When using custom decisionApiUrl, assume it already includes the full path (e.g., /v2/campaigns)
// When using default BASE_API_URL, include envId in path for cloud compatibility
const url = this.config.decisionApiUrl
? `${this.config.decisionApiUrl}${URL_CAMPAIGNS}?${EXPOSE_ALL_KEYS}=true&extras[]=accountSettings`
: `${BASE_API_URL}${this.config.envId}${URL_CAMPAIGNS}?${EXPOSE_ALL_KEYS}=true&extras[]=accountSettings`;
const now = Date.now();

try {
Expand Down
Loading