mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
add origin and referer to response header
This commit is contained in:
parent
3d5c7d5742
commit
0f83a55c25
|
@ -9,6 +9,8 @@ WebUrlRequestInterceptor::WebUrlRequestInterceptor(QObject *p)
|
|||
|
||||
}
|
||||
void WebUrlRequestInterceptor::interceptRequest( QWebEngineUrlRequestInfo &info) {
|
||||
info.setHttpHeader("origin",Utils::Url::getHostBaseFromUrl(info.requestUrl()).toUtf8());
|
||||
info.setHttpHeader("referer",info.requestUrl().url().toUtf8());
|
||||
if( GlobalBroadcaster::instance()->getPreference()->disallowContentFromOtherSites && Utils::isExternalLink( info.requestUrl() ) )
|
||||
{
|
||||
//file:// link ,pass
|
||||
|
|
Loading…
Reference in a new issue