Skip to content

Commit

Permalink
adds ua to shadcn cli
Browse files Browse the repository at this point in the history
  • Loading branch information
ctate committed Jan 26, 2025
1 parent ddf761e commit fa7b5ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/shadcn/src/registry/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ export async function fetchRegistry(paths: string[]) {
const results = await Promise.all(
paths.map(async (path) => {
const url = getRegistryUrl(path)
const response = await fetch(url, { agent })
const response = await fetch(url, {
agent,
headers: {
"User-Agent": "shadcn",
},
})

if (!response.ok) {
const errorMessages: { [key: number]: string } = {
Expand Down

0 comments on commit fa7b5ae

Please sign in to comment.