Skip to content

Commit d171bc8

Browse files
authored
[Docs Site] Fix /client/v4 in APIRequest URL (#20724)
1 parent 9bc6ca6 commit d171bc8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/APIRequest.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ if (!operation) {
4141
);
4242
}
4343
44-
const url = new URL(path, "https://api.cloudflare.com/client/v4");
44+
const url = new URL(
45+
path.startsWith("/") ? path.slice(1) : path,
46+
"https://api.cloudflare.com/client/v4/",
47+
);
4548
const headers: Record<string, string> = {};
4649
4750
const providedParameters = Object.keys(parameters ?? {});

0 commit comments

Comments
 (0)