Skip to content

Commit

Permalink
cloudflare: custom cloudflare resources can use apiToken from config
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Sep 4, 2024
1 parent 4dfff48 commit 29fc222
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platform/src/components/cloudflare/helpers/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

const CLOUDFLARE_API_BASE_URL =
process.env.CLOUDFLARE_API_BASE_URL ?? "https://api.cloudflare.com/client/v4";
const CLOUDFLARE_API_TOKEN = process.env.CLOUDFLARE_API_TOKEN;
const CLOUDFLARE_API_TOKEN =
$app.providers?.cloudflare?.apiToken || process.env.CLOUDFLARE_API_TOKEN;

export interface FetchError {
code: number;
Expand Down

0 comments on commit 29fc222

Please sign in to comment.