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

Publish erigonwatch ui for internal remote use #16

Closed
wants to merge 24 commits into from

Conversation

tosettil-polimi
Copy link
Contributor

The following changes are backward compatible and do not affect the normal development and usage of the erigontech/erigonwatch repository.
These modifications allow those who need it to publish the UI through a proxy so that it can be accessed remotely via a domain.
The changes enable the UI to detect whether it is being served on a domain rather than on localhost (or 127.0.0.1); in such cases, requests made to the Erigon node are directed to the same domain with the /api prefix, to be managed through a proxy.

@mriccobene
Copy link
Member

This PR is for the QA department to remotely monitor the machines running the tests and those producing the prebuilt databases. We are already using it in our infrastructure, publishing it with nginx and securing access with OAuth2.

@dvovk
Copy link
Member

dvovk commented Aug 20, 2024

@mriccobene why don't you use standard remote connection flow ? Have you tried https://testdiag.erigon.io ?

address = address.indexOf("/") >=0 ? address.substring(0, address.indexOf("/")) : address;
}

if (address === "127.0.0.1:6060" || address === "localhost:6060") isDefault = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This address may change as it setups by flag on diag cmd

@dvovk
Copy link
Member

dvovk commented Aug 25, 2024

@mriccobene @tosettil-polimi please check #17 I did some updates and also include changes which I think is required to support proxy. All what I did for it is added this two checks:
if (response.address.includes("127.0.0.1")) { //Check for proxy if (!window.location.origin.includes("127.0.0.1")) { beAddr = window.location.origin + "/api"; } }
Please check is it works as you expected or not

@mriccobene
Copy link
Member

Superseded by #17. Can be closed.

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

Successfully merging this pull request may close these issues.

3 participants