Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
thebalaa authored Jun 11, 2024
1 parent 0aa41f1 commit 8a24280
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/client-link/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ ip link set link0 up
ip link set link0 mtu $LINK_MTU

wg set link0 peer $GATEWAY_LINK_WG_PUBKEY allowed-ips 10.0.0.1/32 persistent-keepalive 30 endpoint $GATEWAY_ENDPOINT
EXPOSE=$(cat <<-END
$EXPOSE {
header_up X-Forwarded-Proto {scheme}
}
END
)

if [ -z ${FORWARD_ONLY+x} ]; then

echo "Using caddy with SSL termination to forward traffic to app."
Expand All @@ -33,6 +28,7 @@ $EXPOSE {
tls_insecure_skip_verify
read_buffer 8192
}
header_up X-Forwarded-Proto {scheme}
}
END
)
Expand All @@ -44,10 +40,18 @@ $EXPOSE {
tls
read_buffer 8192
}
header_up X-Forwarded-Proto {scheme}
}
END
)
fi
else
EXPOSE=$(cat <<-END
$EXPOSE {
header_up X-Forwarded-Proto {scheme}
}
END
)
fi

CADDYFILE='/etc/Caddyfile'
Expand Down

0 comments on commit 8a24280

Please sign in to comment.