mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-26 01:39:51 +01:00
Harden tailnet bind setup
This commit is contained in:
1 parent
6208899d0a
commit
a77206812e
6 files changed
+88
-8
No files matched your search
@@ -56,6 +56,9 @@ type OnboardOptions = {
|
||||
|
||||
type OnboardDefaults = Pick<PaperclipConfig, "database" | "logging" | "server" | "auth" | "storage" | "secrets">;
|
||||
|
||||
const TAILNET_BIND_WARNING =
|
||||
"No Tailscale address was detected during setup. The saved config will stay on loopback until Tailscale is available or PAPERCLIP_TAILNET_BIND_HOST is set.";
|
||||
|
||||
const ONBOARD_ENV_KEYS = [
|
||||
"PAPERCLIP_PUBLIC_URL",
|
||||
"DATABASE_URL",
|
||||
@@ -476,6 +479,9 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
|
||||
});
|
||||
server = preset.server;
|
||||
auth = preset.auth;
|
||||
if (opts.bind === "tailnet" && server.host === "127.0.0.1") {
|
||||
p.log.warn(TAILNET_BIND_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
if (setupMode === "advanced") {
|
||||
|
||||
Reference in new issue
Block a user