mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-28 17:50:28 +08:00
Enable localhost connections in radicle-explorer
Allow radicle-explorer to connect to a locally running radicle-httpd via https://app.radicle.xyz/nodes/localhost. This was previously disabled to encourage use of Radicle Desktop, but is now useful for testing the new always-on node in local development environments. Remove support for /nodes/radicle.local, an undocumented and unused convention. Fix remote node loading when Cloudflare URL-encodes port separator (: → %3A).
This commit is contained in:
@@ -2,7 +2,6 @@ import type { BaseUrl, NodeIdentity, NodeStats } from "@http-client";
|
||||
import type { ErrorRoute, NotFoundRoute } from "@app/lib/router/definitions";
|
||||
|
||||
import * as utils from "@app/lib/utils";
|
||||
import config from "@app/lib/config";
|
||||
import { HttpdClient } from "@http-client";
|
||||
import { ResponseError, ResponseParseError } from "@http-client/lib/fetcher";
|
||||
import { handleError } from "@app/views/nodes/error";
|
||||
@@ -30,19 +29,6 @@ export async function loadUserRoute({
|
||||
did,
|
||||
baseUrl,
|
||||
}: UserRoute): Promise<UserLoadedRoute | NotFoundRoute | ErrorRoute> {
|
||||
if (
|
||||
import.meta.env.PROD &&
|
||||
utils.isLocal(`${baseUrl.hostname}:${baseUrl.port}`)
|
||||
) {
|
||||
return {
|
||||
resource: "error",
|
||||
params: {
|
||||
icon: "device",
|
||||
title: "Local node browsing not supported",
|
||||
description: `You're trying to access a local node from your browser, we are currently working on a desktop app specific for this use case. Join our <strong>#desktop</strong> channel on <radicle-external-link href="${config.supportWebsite}">${config.supportWebsite}</radicle-external-link> for more information.`,
|
||||
},
|
||||
};
|
||||
}
|
||||
const parsedDid = utils.parseNodeId(decodeURIComponent(did));
|
||||
if (!parsedDid) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user