feat: Handle HTTPS domain in ConfigureCloudflareTunnels
This commit is contained in:
parent
ec216254b5
commit
d55e4bf381
1 changed files with 5 additions and 0 deletions
|
|
@ -30,6 +30,11 @@ public function alreadyConfigured()
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
if (str($this->ssh_domain)->contains('https://')) {
|
||||||
|
$this->ssh_domain = str($this->ssh_domain)->replace('https://', '')->replace('http://', '')->trim();
|
||||||
|
// remove / from the end
|
||||||
|
$this->ssh_domain = str($this->ssh_domain)->replace('/', '');
|
||||||
|
}
|
||||||
$server = Server::ownedByCurrentTeam()->where('id', $this->server_id)->firstOrFail();
|
$server = Server::ownedByCurrentTeam()->where('id', $this->server_id)->firstOrFail();
|
||||||
ConfigureCloudflared::dispatch($server, $this->cloudflare_token);
|
ConfigureCloudflared::dispatch($server, $this->cloudflare_token);
|
||||||
$server->settings->is_cloudflare_tunnel = true;
|
$server->settings->is_cloudflare_tunnel = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue