Copied to clipboard

Flag this post as spam?

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


  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Sep 27, 2018 @ 23:40
    Nicholas Westby
    0

    Site Creating Links to HTTP from HTTPS Version of Site

    The Issue

    I have a site that is supposed to use the URL https://www.domain.com. Every now and then, a URL on the page that should point to /something instead points to http://www.domain.com/something (that is, it includes the HTTP scheme, which is wrong, in addition to the domain).

    Why It's Problematic

    Long story short, this is causing us problems because of the SPA-navigation on the site (can't make an AJAX request from an HTTPS site to an HTTP site, and some funky URL parsing shenanigans). It's exacerbated by the fact that we cache some of these URL's, so they stick around for hours.

    Possible Cause

    My thought is that this is happening because sometimes the application URL is being detected incorrectly. I did notice in the logs that it said "New ApplicationUrl detected: https://localhost/umbraco" right around one of the times that this link issue happened.

    Additional Background

    What I've tried so far:

    • Configured the hostname on the root node as "www.domain.com" (as well as "funkyazuredomain.azurewebsites.net").
    • Set the applicationStartUrl in umbracoSettings.config to https://www.domain.com/umbraco. I see from the logs that this is being set, but then there is usually a subsequent log entry that says the new application URL is https://www.domain.com:443/umbraco (it tacks on the SSL port).
    • Created a redirect from HTTP to HTTPS.
    • Creatd a redirect from funkyazuredomain.azurewebsites.net to www.domain.com.
    • Set umbracoUseSsl in the web.config to true.

    Context:

    • Hosted on Azure (NOT using Umbraco Cloud).
    • Umbraco 7.10.4.
  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Sep 28, 2018 @ 12:03
    Dan Diplo
    0

    I'm not sure of the answer, but I've seen some funky things with the Application URL happening. Do you remember this tweet of mine?

    https://twitter.com/DanDiplo/status/1017469659216572416

    What version are you running? I've noticed this weirdness less in the latest versions, so maybe an upgrade would help?

    Have you set umbracoUseSSL=true in web.config ?

  • Brian 1 post 71 karma points
    Feb 08, 2020 @ 10:54
    Brian
    0

    I'm not sure of the answer, but I've seen some funky things with the Application URL happening. Do you remember this tweet of mine?

    https://twitter.com/batman/status/1017469659216572416

    What version are you running? I've noticed this weirdness less in the latest versions, so maybe an upgrade would help?

    There's currently no built-in way to make a few pages in Umbraco return a https url.

    The only way I can think of doing this at the moment is just by making sure that you set up your links correctly.

    But there's no way of stopping people from entering the insecure link. That is where the redirects come in handy though, it will make sure you don't get to a secure page insecurely.

    I would recommend running the whole site in https mode. In the past, performance would have been an objection to running your full site in https mode. However with modern servers, this really shouldn't be a problem any more.

Please Sign in or register to post replies

Write your reply to:

Draft