Fix: Add referer header
This commit is contained in:
parent
d2a0c9a2d5
commit
bef407ebc3
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ BRWidget::BRWidgetStatusCode BRProviderVl::getWidgetData(BRCalendar::BRCalendarD
|
|||
{
|
||||
// load some data
|
||||
QString requestUrl = "https://ifsc.results.info/api/v1/";
|
||||
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}});
|
||||
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}, {"Referer", "https://ifsc.results.info/"}});
|
||||
|
||||
if(ret["status"] != 200){
|
||||
// request was a failure
|
||||
|
@ -83,7 +83,7 @@ BRSeason::BRSeasonData BRProviderVl::parseSeasonData(QVariantMap rawData) {
|
|||
BRWidget::BRWidgetStatusCode BRProviderVl::getWidgetData(BRLeague::BRLeagueData* leagueData) {
|
||||
// load some data
|
||||
QString requestUrl = "https://ifsc.results.info/api/v1/season_leagues/" + QString::number(leagueData->league->getId());
|
||||
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}});
|
||||
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}, {"Referer", "https://ifsc.results.info/"}});
|
||||
|
||||
if(ret["status"] != 200){
|
||||
// request was a failure
|
||||
|
@ -156,7 +156,7 @@ BRWidget::BRWidgetStatusCode BRProviderVl::getWidgetData(BRCompetition::BRCompet
|
|||
requestUrl = "https://ifsc.results.info/api/v1/category_rounds/" + roundId + "/results";
|
||||
}
|
||||
|
||||
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}});
|
||||
QVariantMap ret = this->serverRequest(QUrl(requestUrl), {{"x-auth-token", "cc7375f680648e7e6171e035e70351eb"}, {"Referer", "https://ifsc.results.info/"}});
|
||||
|
||||
if(ret["status"] != 200){
|
||||
// request was a failure
|
||||
|
|
Loading…
Reference in a new issue