Skip to content

Commit

Permalink
send cookies in npm package meta request
Browse files Browse the repository at this point in the history
  • Loading branch information
raheeliftikhar5 committed Nov 4, 2024
1 parent 84d1ea3 commit 3464e6b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/packages/lowcoder/src/comps/utils/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ export function parseCompType(compType: string) {
}

export async function getNpmPackageMeta(packageName: string) {
const res = await axios.get<NpmPackageMeta>(`${NPM_REGISTRY_URL}/none/${packageName}`);
const axiosInstance = axios.create({
baseURL: NPM_REGISTRY_URL,
withCredentials: true,
})
const res = await axiosInstance.get<NpmPackageMeta>(
`/none/${packageName}`,
);
if (res.status >= 400) {
return null;
}
Expand Down

0 comments on commit 3464e6b

Please sign in to comment.