Skip to content

Commit

Permalink
feat: allow to accept cloudflare notice
Browse files Browse the repository at this point in the history
  • Loading branch information
anbraten committed Oct 2, 2023
1 parent e8dd17c commit ad8b66c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tunnel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface TunnelOptions {
hostname?: string;
protocol?: "http" | "https";
verifyTLS?: boolean;
acceptCloudflareNotice?: boolean;
}

export interface Tunnel {
Expand Down Expand Up @@ -34,7 +35,7 @@ export async function startTunnel(

if (!existsSync(cloudflaredBinPath)) {
consola.log(cloudflaredNotice);
const canInstall = await consola.prompt(
const canInstall = opts.acceptCloudflareNotice || await consola.prompt(
`Do you agree with the above terms and wish to install the binary from GitHub?`,
{
type: "confirm",
Expand Down

0 comments on commit ad8b66c

Please sign in to comment.