Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Phil Dye 147 posts 302 karma points
    Nov 05, 2015 @ 18:06
    Phil Dye

    https teaCommerceCallBackUrl

    Can someone confirm the code that determines the teaCommerceCallBackUrl, when passed into GenerateHtmlForm in a payment provider?

    I have an issue in production, that I can't replicate when debugging locally - I suspect it might be that the url being generated is http, because I'm using SSL termination on an external load-balancer, so as far as Umbraco is concerned, the request is http (similar problems exist with scheduledTasks and load balancing within Umbraco itself).

    If teaCommerceCallBackUrl is generated using the Request.Scheme, that'll be my issue...


  • Phil Dye 147 posts 302 karma points
    Nov 05, 2015 @ 19:17
    Phil Dye

    By a process of elimination, I'm pretty sure that teaCommerceCallBackUrl was being generated with just http (as the request is, by the time it reaches IIS).

    I've worked around this by setting an IIS rewrite rule as follows;

                <rule name="Set HTTPS for HTTP_X_FORWARDED_PROTO https">
                    <match url=".*" />
                        <add input="{HTTP_X_FORWARDED_PROTO}" pattern="https" />
                        <set name="HTTPS" value="on" />
                        <set name="SERVER_PORT" value="443" />
                    <action type="None" />

    (in our case, the Rackspace Cloud load balancer we use to terminate SSL sets the X-Forwarded-Proto header)

    Note that to do this requires the server variables to be allowed to be set, which is a global IIS setting, in the applicationHost.config.

    Coincidentally, this has also helped with all sorts of Umbraco url-generation issues, so I also no longer need to use baseUrl etc in the umbracoSettings.config to fix scheduledTasks or distributedCalls.

    Hope this helps someone,


  • Anders Burla Johansen 2560 posts 8256 karma points
    Nov 06, 2015 @ 10:46
  • Phil Dye 147 posts 302 karma points
    Nov 06, 2015 @ 10:59
    Phil Dye

    Thanks Anders; that confirms that request.Url.Scheme is used, which would have caused this problem. The rewrite rules above work around that.


Please Sign in or register to post replies

Write your reply to: