Skip to content
Permalink
Browse files

referer works for wms/wmts

  • Loading branch information
Stefan Ziegler
Stefan Ziegler committed Mar 29, 2013
1 parent 83d0130 commit b06eecadd477731c8a0920376878a4381e420ab3
Showing with 6 additions and 1 deletion.
  1. +5 −0 src/providers/wms/qgswmsprovider.cpp
  2. +1 −1 src/ui/qgsnewhttpconnectionbase.ui
@@ -4364,6 +4364,11 @@ void QgsWmsProvider::setAuthorization( QNetworkRequest &request ) const
{
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( mUserName ).arg( mPassword ).toAscii().toBase64() );
}

if ( !mReferer.isNull() )
{
request.setRawHeader( "Referer", QString( "%1" ).arg( mReferer ).toAscii() );
}
}

QVector<QgsWmsSupportedFormat> QgsWmsProvider::supportedFormats()
@@ -55,7 +55,7 @@
</sizepolicy>
</property>
<property name="text">
<string>If the service requires basic authentication, enter a user name and optional password</string>
<string>If the service requires basic authentication, enter a user name, an optional password and an optional referer</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>

0 comments on commit b06eeca

Please sign in to comment.
You can’t perform that action at this time.