make the NEXT_PUBLIC_MULTIVERSX_API actual public API endpoint (not proxied)
use a different name for the proxy endpoint, for example, NEXT_PUBLIC_MULTIVERSX_API_PROXY.
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:
make the private env var MULTIVERSX_CUSTOM_API optional and check if it exists
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).
First solution:
NEXT_PUBLIC_MULTIVERSX_API
actual public API endpoint (not proxied)NEXT_PUBLIC_MULTIVERSX_API_PROXY
.NEXT_PUBLIC_MULTIVERSX_API_PROXY
as optional env var. If not present, then useNEXT_PUBLIC_MULTIVERSX_API
as Elrond's public API endpoint (visible for all)Second solution, probably better:
MULTIVERSX_CUSTOM_API
optional and check if it existsNEXT_PUBLIC_MULTIVERSX_API
as is, but use it for absolute public API endpoint or for relative proxy API endpoint whenMULTIVERSX_CUSTOM_API
is configuredChanges will require a new major version and improvements in docs, more info about it (README.md).