2017-12-30 02:26:55 +01:00
|
|
|
#ifdef SYNCTHINGWIDGETS_USE_WEBENGINE
|
|
|
|
#include "./webviewinterceptor.h"
|
|
|
|
|
2021-01-25 19:48:11 +01:00
|
|
|
#include <syncthingconnector/syncthingconnectionsettings.h>
|
2017-12-30 02:26:55 +01:00
|
|
|
|
|
|
|
#include <QWebEngineProfile>
|
|
|
|
#include <QWebEngineUrlRequestInterceptor>
|
|
|
|
|
|
|
|
namespace QtGui {
|
|
|
|
|
|
|
|
void WebViewInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
|
|
|
|
{
|
2023-03-28 17:20:59 +02:00
|
|
|
info.setHttpHeader(QByteArrayLiteral("X-API-Key"), m_settings.apiKey);
|
2017-12-30 02:26:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace QtGui
|
|
|
|
|
|
|
|
#endif // SYNCTHINGWIDGETS_USE_WEBENGINE
|