[GH-ISSUE #3186] Add support for custom script URL in openAPI plugin #9505

Closed
opened 2026-04-13 04:59:37 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @itsyoboieltr on GitHub (Jun 27, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3186

Is this suited for github?

  • Yes, this is suited for github

The current implementation of the openAPI plugin uses a hardcoded CDN URL to load the Scalar API Reference script. This makes it impossible to use it in environments where internet access is restricted or self-hosting is required.

Describe the solution you'd like

This issue proposes adding support for a new optional configuration option: apiReferenceScriptSrc. When provided, this will be used instead of the default hard-coded CDN URL, allowing users to self-host the script and still benefit from Scalar.

Describe alternatives you've considered

As far as I understand, there are no alternatives to this in environments without internet access.

Additional context

A user may want to:

  • Serve the Scalar API Reference Script from their own internal server.
  • Avoid relying on external CDNs due to security policies or lack of connectivity.
Originally created by @itsyoboieltr on GitHub (Jun 27, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3186 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. The current implementation of the openAPI plugin uses a hardcoded CDN URL to load the Scalar API Reference script. This makes it impossible to use it in environments where internet access is restricted or self-hosting is required. ### Describe the solution you'd like This issue proposes adding support for a new optional configuration option: `apiReferenceScriptSrc`. When provided, this will be used instead of the default hard-coded CDN URL, allowing users to self-host the script and still benefit from Scalar. ### Describe alternatives you've considered As far as I understand, there are no alternatives to this in environments without internet access. ### Additional context A user may want to: - Serve the Scalar API Reference Script from their own internal server. - Avoid relying on external CDNs due to security policies or lack of connectivity.
GiteaMirror added the enhancementlocked labels 2026-04-13 04:59:37 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 26, 2025):

Hi, @itsyoboieltr. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested an optional configuration option apiReferenceScriptSrc for the openAPI plugin.
  • This option would replace the hardcoded CDN URL for the Scalar API Reference script.
  • The goal is to enable self-hosting the script for environments with restricted internet or strict security policies.
  • Currently, the plugin does not support offline or self-hosted alternatives.
  • There has been no further activity or comments on this issue.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of better-auth by commenting here.
  • If I do not hear back within 7 days, I will automatically close this issue.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3339357495 --> @dosubot[bot] commented on GitHub (Sep 26, 2025): Hi, @itsyoboieltr. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested an optional configuration option `apiReferenceScriptSrc` for the openAPI plugin. - This option would replace the hardcoded CDN URL for the Scalar API Reference script. - The goal is to enable self-hosting the script for environments with restricted internet or strict security policies. - Currently, the plugin does not support offline or self-hosted alternatives. - There has been no further activity or comments on this issue. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of better-auth by commenting here. - If I do not hear back within 7 days, I will automatically close this issue. Thank you for your understanding and contribution!
Author
Owner

@itsyoboieltr commented on GitHub (Sep 27, 2025):

Still relevant

<!-- gh-comment-id:3341472373 --> @itsyoboieltr commented on GitHub (Sep 27, 2025): Still relevant
Author
Owner

@dosubot[bot] commented on GitHub (Dec 27, 2025):

Hi, @itsyoboieltr. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested an optional configuration apiReferenceScriptSrc for the openAPI plugin to replace the hardcoded Scalar API Reference script URL.
  • This change would enable self-hosting the script for restricted or secure environments.
  • The feature is currently not supported in the repository.
  • You confirmed the issue is still relevant after being marked stale due to inactivity.
  • The issue remains unresolved and awaits further action from the maintainers.

Next Steps:

  • Please confirm if this feature is still important for your use case with the latest version of better-auth by commenting on this issue.
  • If no further activity occurs within 7 days, I will automatically close the issue.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3694068240 --> @dosubot[bot] commented on GitHub (Dec 27, 2025): Hi, @itsyoboieltr. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested an optional configuration `apiReferenceScriptSrc` for the openAPI plugin to replace the hardcoded Scalar API Reference script URL. - This change would enable self-hosting the script for restricted or secure environments. - The feature is currently not supported in the repository. - You confirmed the issue is still relevant after being marked stale due to inactivity. - The issue remains unresolved and awaits further action from the maintainers. **Next Steps:** - Please confirm if this feature is still important for your use case with the latest version of better-auth by commenting on this issue. - If no further activity occurs within 7 days, I will automatically close the issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9505