Switch to HTTPS

master
Markus Koch 2022-01-03 16:34:50 +01:00
parent 0561bbc4f7
commit e8e476b9bb
4 changed files with 8 additions and 8 deletions

View File

@ -51,7 +51,7 @@ KonaImage::KonaImage(KonaClient *Kc, int Id, QStringList Tags, int CreatedAt, in
previewFile->setFileName(KONAIMAGE_PREVIEWPATH);
// Prepare preview HTTP
previewHttp = new QHttp("konachan.com"); //TODO: all these konachans.com should be Kc->getServer()
previewHttp = new QHttp("konachan.com", QHttp::ConnectionModeHttps); //TODO: all these konachans.com should be Kc->getServer()
connect(previewHttp, SIGNAL(responseHeaderReceived(QHttpResponseHeader)),
this, SLOT(previewResponseHeaderReceived(QHttpResponseHeader)));
connect(previewHttp, SIGNAL(requestFinished(int,bool)),
@ -63,7 +63,7 @@ KonaImage::KonaImage(KonaClient *Kc, int Id, QStringList Tags, int CreatedAt, in
imageFile->setFileName(KONAIMAGE_LOCALPATH);
// Prepare image HTTP
imageHttp = new QHttp("konachan.com");
imageHttp = new QHttp("konachan.com", QHttp::ConnectionModeHttps);
connect(imageHttp, SIGNAL(responseHeaderReceived(QHttpResponseHeader)),
this, SLOT(imageResponseHeaderReceived(QHttpResponseHeader)));
connect(imageHttp, SIGNAL(requestFinished(int,bool)),
@ -75,7 +75,7 @@ KonaImage::KonaImage(KonaClient *Kc, int Id, QStringList Tags, int CreatedAt, in
jpegFile->setFileName(KONAIMAGE_JPEGPATH);
// Prepare jpeg HTTP
jpegHttp = new QHttp("konachan.com");
jpegHttp = new QHttp("konachan.com", QHttp::ConnectionModeHttps);
connect(jpegHttp, SIGNAL(responseHeaderReceived(QHttpResponseHeader)),
this, SLOT(jpegResponseHeaderReceived(QHttpResponseHeader)));
connect(jpegHttp, SIGNAL(requestFinished(int,bool)),
@ -87,7 +87,7 @@ KonaImage::KonaImage(KonaClient *Kc, int Id, QStringList Tags, int CreatedAt, in
sampleFile->setFileName(KONAIMAGE_SAMPLEPATH);
// Prepare sample HTTP
sampleHttp = new QHttp("konachan.com");
sampleHttp = new QHttp("konachan.com", QHttp::ConnectionModeHttps);
connect(sampleHttp, SIGNAL(responseHeaderReceived(QHttpResponseHeader)),
this, SLOT(sampleResponseHeaderReceived(QHttpResponseHeader)));
connect(sampleHttp, SIGNAL(requestFinished(int,bool)),

View File

@ -18,7 +18,7 @@ KonaRelatedTags::KonaRelatedTags(KonaClient *Kc, QString Tags, QString Type)
}
// Prepare HTTP
http = new QHttp(kc->getServer());
http = new QHttp(kc->getServer(), QHttp::ConnectionModeHttps);
connect(http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)),
this, SLOT(responseHeaderReceived(QHttpResponseHeader)));
connect(http, SIGNAL(requestFinished(int,bool)),

View File

@ -31,7 +31,7 @@ KonaSearch::KonaSearch(KonaClient *Kc, QString Tags, int Page, int Limit)
}
// Prepare HTTP
http = new QHttp(kc->getServer());
http = new QHttp(kc->getServer(), QHttp::ConnectionModeHttps);
connect(http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)),
this, SLOT(responseHeaderReceived(QHttpResponseHeader)));
connect(http, SIGNAL(requestFinished(int,bool)),
@ -94,7 +94,7 @@ void KonaSearch::searchAgain()
return;
}
QUrl url("/post/index.xml?limit=" + QString::number(limit) + "&page=" + QString::number(page) + "&tags=" + tags);
QUrl url("/post.xml?limit=" + QString::number(limit) + "&page=" + QString::number(page) + "&tags=" + tags);
http->get(url.toString(), file);
}

View File

@ -21,7 +21,7 @@ MainWindow::MainWindow(QWidget *parent) :
bottomPage = 1;
insertAtBeginning = false;
kc = new KonaClient(QDir::tempPath() + "/KonaClient", "/home/markus/Bilder/KonaChan/Cache", "/home/markus/Bilder/KonaChan/Archive");
kc = new KonaClient(QDir::tempPath() + "/KonaClient", QDir::homePath() + "/Pictures/KonaChan/Cache", QDir::homePath() + "/Pictures/KonaChan/Archive");
flowLayout = new FlowLayout;