Fix mixed content warning when connecting to local node

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2023-04-05 13:49:52 +02:00
parent 016b5e9d0a
commit 9e1fc49ae7
8 changed files with 20 additions and 18 deletions
+1 -1
View File
@@ -278,7 +278,7 @@ export function extractHost(origin: string): Host {
origin === "127.0.0.1" ||
origin === "127.0.0.1:8080"
) {
return { host: "0.0.0.0", port: 8080, scheme: "http" };
return { host: "127.0.0.1", port: 8080, scheme: "http" };
} else if (origin.includes(":")) {
return {
host: origin.split(":")[0],
+6 -4
View File
@@ -1,17 +1,19 @@
<script lang="ts">
import type { Host } from "@app/lib/api";
import Clipboard from "@app/components/Clipboard.svelte";
import Floating from "@app/components/Floating.svelte";
import { closeFocused } from "@app/components/Floating.svelte";
import { parseRepositoryId } from "@app/lib/utils";
export let seedHost: string;
export let seedHost: Host;
export let id: string;
export let name: string;
$: radCloneUrl = `rad clone ${id}`;
$: gitCloneUrl = `git clone https://${seedHost}/${
parseRepositoryId(id)?.pubkey ?? id
}.git ${name}`;
$: gitCloneUrl = `git clone ${seedHost.scheme}://${seedHost.host}:${
seedHost.port
}/${parseRepositoryId(id)?.pubkey ?? id}.git ${name}`;
</script>
<style>
+1 -1
View File
@@ -101,7 +101,7 @@
on:branchChanged={event => updateRevision(event.detail)} />
{#if seed.addr.host}
<CloneButton seedHost={seed.addr.host} {id} name={project.name} />
<CloneButton seedHost={seed.addr} {id} name={project.name} />
{/if}
<span>