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

Configure a prefix in the routes #2752

Open
Sevi7 opened this issue Sep 12, 2022 · 2 comments
Open

Configure a prefix in the routes #2752

Sevi7 opened this issue Sep 12, 2022 · 2 comments

Comments

@Sevi7
Copy link

Sevi7 commented Sep 12, 2022

Feature Description

Add a new environment variable to set a prefix in the routes. I would like to prefix the routes with /bitgo for example so /api/v2/pingexpress would become /bitgo/api/v2/pingexpress.

Motivation

The need arises because I am sharing AWS Load Balancers between different services and the prefix is the one routing requests to the corresponding service. So the service would need to accept the prefix before its routes.

Context

@mmcshinsky-bitgo
Copy link
Contributor

Hi @Sevi7. You should be able to set this by using the environmental key BITGO_CUSTOM_ROOT_URI.

BITGO_CUSTOM_ROOT_URI=example.com/bitgo

Result:
example.com/bitgo/api/v2...

@Sevi7
Copy link
Author

Sevi7 commented Sep 14, 2022

Hi @mmcshinsky-bitgo thanks for your quick reply. I had already tried with
BITGO_CUSTOM_ROOT_URI=https://0.0.0.0:3080/bitgo
but the result was:

customRootUri or customBitcoinNetwork is set, but env is 'test'. Setting env to 'custom'.
Environment: custom
BitGo-Express running
Custom root URI: https://0.0.0.0:3080/bitgo
Base URI: https://0.0.0.0:3080
error 404: bitgo-express can only proxy BitGo API requests
1.0.78.237 - local_express [14/Sep/2022:19:18:37 +0000] "GET /bitgo/api/v2/pingexpress HTTP/1.1" 404 176 "-" "PostmanRuntime/7.29.2"
failed to fetch initial client constants from BitGo

As you can see in GET /bitgo/api/v2/pingexpress /bitgo/ prefix still appears. I don't know if I'm configuring something wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants