Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the API proxy optional. For example, when someone uses public API, it isn't needed at all #18

Closed
juliancwirko opened this issue Dec 4, 2022 · 0 comments · Fixed by #19
Assignees
Labels
enhancement New feature or request

Comments

@juliancwirko
Copy link
Member

juliancwirko commented Dec 4, 2022

First solution:

  1. make the NEXT_PUBLIC_MULTIVERSX_API actual public API endpoint (not proxied)
  2. use a different name for the proxy endpoint, for example, NEXT_PUBLIC_MULTIVERSX_API_PROXY.
  3. allow passing the NEXT_PUBLIC_MULTIVERSX_API_PROXY as optional env var. If not present, then use NEXT_PUBLIC_MULTIVERSX_API as Elrond's public API endpoint (visible for all)

Second solution, probably better:

  1. make the private env var MULTIVERSX_CUSTOM_API optional and check if it exists
  2. keep the public env var NEXT_PUBLIC_MULTIVERSX_API as is, but use it for absolute public API endpoint or for relative proxy API endpoint when MULTIVERSX_CUSTOM_API is configured

Changes will require a new major version and improvements in docs, more info about it (README.md).

@juliancwirko juliancwirko added the enhancement New feature or request label Dec 4, 2022
@juliancwirko juliancwirko self-assigned this Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

1 participant