Adding custom authorization headers for private registry compatibility #6794
Replies: 4 comments 1 reply
-
Ia this implemented, or is there a workaround for this ? |
Beta Was this translation helpful? Give feedback.
-
For the time being, we wrote our own shadcn cli wrapper that uses @mswjs/interceptors to intercept HTTP requests and rewrite them to include the |
Beta Was this translation helpful? Give feedback.
-
Wouldn't it just make sense for it pull the github repo and build it while adding components from the registry ? This whole hosting thing is weird |
Beta Was this translation helpful? Give feedback.
-
Hello guys, I guess this would help right ? : #7745 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I hope this message finds you well. I am writing to propose an enhancement to the shadcn library that would significantly benefit our company and potentially other organizations with similar requirements.
Current Situation and Requirement
Our company aims to establish a private registry for our design system library, utilizing a private GitHub repository as the primary storage. We wish to maintain the privacy of our repository while still leveraging the
npx shadcn
command for package management.Proposed Solution
We have identified a straightforward method to achieve this functionality by modifying the
fetch
function in the following file:ui/packages/shadcn/src/registry/api.ts
Line 189 in fed2bac
The modification involves adding an authorization header:
This approach is further elaborated in the following GitHub discussion:
https://github.com/orgs/community/discussions/22537#discussioncomment-3237244
Enhancement Suggestion
To maximize flexibility and accommodate various security implementations, we propose allowing the addition of custom authorization headers. This enhancement would enable the use of not only GitHub but any private URL secured through similar authentication methods.
Benefits
We believe this enhancement would significantly increase the utility of shadcn for enterprise users and organizations with specific security requirements.
Thank you for considering this proposal. We look forward to your feedback and the possibility of implementing this feature in a future release.
Beta Was this translation helpful? Give feedback.
All reactions