API - use current scheme

This caused issues for me locally forcing http to test requests. Ok to
change @claudiosanches ?
This commit is contained in:
Mike Jolley 2017-09-07 15:32:29 +01:00
parent a8a33c8f0d
commit b0cb64b93d
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ class WC_REST_Authentication {
if ( substr( $request_path, 0, strlen( $wp_base ) ) === $wp_base ) {
$request_path = substr( $request_path, strlen( $wp_base ) );
}
$base_request_uri = rawurlencode( get_home_url( null, $request_path ) );
$base_request_uri = rawurlencode( get_home_url( null, $request_path, is_ssl() ? 'https' : 'http' ) );
// Get the signature provided by the consumer and remove it from the parameters prior to checking the signature.
$consumer_signature = rawurldecode( str_replace( ' ', '+', $params['oauth_signature'] ) );