mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-24 22:48:23 -05:00
dbhub: Use port 5550 for local development server
When connecting to a locally running development server use port 5550 instead of 443. This allows the server to run without any special rights.
This commit is contained in:
+10
-4
@@ -381,11 +381,17 @@ QString RemoteDatabase::getInfoFromClientCert(const QString& cert, CertInfo info
|
||||
|
||||
// Return requested part of the CN
|
||||
if(info == CertInfoUser)
|
||||
{
|
||||
return cn_parts.first();
|
||||
else if(info == CertInfoServer)
|
||||
return cn_parts.last();
|
||||
else
|
||||
return QString();
|
||||
} else if(info == CertInfoServer) {
|
||||
// Assemble the full URL from the host name. We use port 443 by default but for
|
||||
// local development purposes we use 5550 instead.
|
||||
QString host = cn_parts.last();
|
||||
host = QString("https://%1:%2/").arg(host).arg(host.contains("docker-dev") ? "5550" : "443");
|
||||
return host;
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool RemoteDatabase::prepareSsl(QNetworkRequest* request, const QString& clientCert)
|
||||
|
||||
+2
-3
@@ -87,8 +87,7 @@ void RemoteDock::setNewIdentity(const QString& identity)
|
||||
return;
|
||||
|
||||
// Open root directory. Get host name from client cert
|
||||
QString host = remoteDatabase.getInfoFromClientCert(cert, RemoteDatabase::CertInfoServer);
|
||||
remoteModel->setNewRootDir(QString("https://%1:443/").arg(host), cert);
|
||||
remoteModel->setNewRootDir(remoteDatabase.getInfoFromClientCert(cert, RemoteDatabase::CertInfoServer), cert);
|
||||
|
||||
// Enable buttons if necessary
|
||||
enableButtons();
|
||||
@@ -131,7 +130,7 @@ void RemoteDock::pushDatabase()
|
||||
name = name.remove(QRegExp("_[0-9]+.remotedb$"));
|
||||
|
||||
// Show the user a dialog for setting all the commit details
|
||||
QString host = QString("https://%1:443/").arg(remoteDatabase.getInfoFromClientCert(remoteModel->currentClientCertificate(), RemoteDatabase::CertInfoServer));
|
||||
QString host = remoteDatabase.getInfoFromClientCert(remoteModel->currentClientCertificate(), RemoteDatabase::CertInfoServer);
|
||||
RemotePushDialog pushDialog(this, remoteDatabase, host, remoteModel->currentClientCertificate(), name);
|
||||
if(pushDialog.exec() != QDialog::Accepted)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user