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

Add admin-url to the add-peer dialogue #416

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/utils/netbird.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ export const GRPC_API_ORIGIN = config.grpcApiOrigin;

export const getNetBirdUpCommand = () => {
let cmd = "netbird up";
if (!GRPC_API_ORIGIN) return cmd;
cmd += " --management-url " + GRPC_API_ORIGIN;
if (GRPC_API_ORIGIN) {
cmd += " --management-url " + GRPC_API_ORIGIN
}
if (!isNetBirdHosted()) {
let admin_url = window.location.protocol + "://" + window.location.hostname
if (window.location.port != "") {
admin_url += ":" + window.location.port
}
cmd += " --admin-url " + admin_url
};
return cmd;
};

Expand Down
Loading