New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPE remoting proxy uses HTTP instead of HTTPS #1005

sitecorepm opened this Issue May 18, 2018 · 0 comments


2 participants

sitecorepm commented May 18, 2018

Expected Behavior

When calling "New-ScriptSession" with a URL using HTTPS, the resulting $session.Connection.Proxy.Url should also use HTTPS.

Actual Behavior

When calling "New-ScriptSession" with a URL using HTTPS, the resulting $session.Connection.Proxy.Url is returning HTTP.

Steps to Reproduce the Problem

This is a problem specific to our networking setup.

Client ----(HTTPS)----> LB ----(HTTP)----> Server

Our load balancer (LB) hosts our SSL cert and does NOT re-encrypt traffic to the server, therefore the WSDL file response uses HTTP instead of HTTPS as the service URL.

To work around this issue, I added the following code to the New-ScriptSession.ps1 (at line 119)

$proxy = New-WebServiceProxy @proxyProps
if($Credential) {
    $proxy.Credentials = $Credential
} elseif ($UseDefaultCredential.IsPresent) {
    $proxy.UseDefaultCredentials = $true

# -------------- WORKAROUND----------------------------------------
# If the returned proxy URL doesn't match schemes, force it
# This can happen due to load balancers hosting SSL certs instead of the server 
if (!$proxy.Url.StartsWith($uri.Scheme + "://")){
    Write-Verbose "Changing proxy URL scheme to: $($uri.Scheme)"
    $proxy.Url = $proxy.Url -replace "^https?", $uri.Scheme
# -------------- END WORKAROUND----------------------------------------

if($Timeout -gt 0) {
    $proxy.Timeout = $Timeout * 1000

Related Slack chat (

SPE 4.7 and Sitecore 7.5

  • Tested issue with clean install of Sitecore and the latest available version of SPE.

  • Asked questions on the Sitecore Slack Chat channel.

  • Reviewed questions and answers on the Sitecore Stack Exchange.

@michaellwest michaellwest added this to the 4.8 milestone May 18, 2018

@michaellwest michaellwest self-assigned this May 18, 2018

@michaellwest michaellwest moved this from To do to Testing in More awesome without v7 May 19, 2018

More awesome without v7 automation moved this from Testing to Done Oct 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment