Merge pull request #4510 from nextcloud/bugfix/fixWebFlowV1GssSso

only add OCS-APIREQUEST header for 1st request of webflow v1
This commit is contained in:
Matthieu Gallien 2022-05-10 11:39:21 +02:00 committed by GitHub
commit 1858409d9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)