From: Matthieu Gallien Date: Tue, 10 May 2022 06:31:26 +0000 (+0200) Subject: only add OCS-APIREQUEST header for 1st request of webflow v1 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~15^2~227^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=553d324d3d4f8b5c96c02a8fd6ec193637ed4697;p=nextcloud-desktop.git only add OCS-APIREQUEST header for 1st request of webflow v1 Signed-off-by: Matthieu Gallien --- diff --git a/src/gui/wizard/webview.cpp b/src/gui/wizard/webview.cpp index 9d48397da..5f58df4f4 100644 --- a/src/gui/wizard/webview.cpp +++ b/src/gui/wizard/webview.cpp @@ -136,7 +136,10 @@ WebViewPageUrlRequestInterceptor::WebViewPageUrlRequestInterceptor(QObject *pare } void WebViewPageUrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) { - info.setHttpHeader("OCS-APIREQUEST", "true"); + if (info.initiator().isEmpty()) { + info.setHttpHeader("OCS-APIREQUEST", "true"); + qCDebug(lcWizardWebiew()) << info.requestMethod() << "add extra header" << "OCS-APIREQUEST"; + } } WebViewPageUrlSchemeHandler::WebViewPageUrlSchemeHandler(QObject *parent)