Skip to content

Commit

Permalink
referer works for wms/wmts
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Ziegler committed Mar 29, 2013
1 parent 83d0130 commit b06eeca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsnewhttpconnectionbase.ui
Expand Up @@ -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>
Expand Down

0 comments on commit b06eeca

Please sign in to comment.