Copied to clipboard

Flag this post as spam?

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


  • Marcus 41 posts 182 karma points
    5 days ago
    Marcus
    0

    Umbraco 13.3.0 - URLs generated are non-https

    Hi all,

    I noticed that when running local (development mode). The url of nodes (or media items) generated http or https based on the url. For example:

    enter image description here

    enter image description here

    This is also same when doing content.Url(mode: UrlMode.Absolute) in razor view page

    But when the site hosted. If we access url with https the URLs generated are non-https.

    Is that because my any mistake?

    Thanks for any help!

  • Yakov Lebski 567 posts 2153 karma points
    5 days ago
    Yakov Lebski
    0

    Do you have CDN like Cloudflare or another?

  • Marcus 41 posts 182 karma points
    4 days ago
    Marcus
    0

    Hi Yakov,

    Yes I do. We are using Cloudflare

  • Marcus 41 posts 182 karma points
    4 days ago
    Marcus
    0

    For more about my site, I cannot set UseHttps to true (appsettings.json) because of some conflict in server configuration. If set to true, I will get too many redirects error

    enter image description here

  • Yakov Lebski 567 posts 2153 karma points
    4 days ago
    Yakov Lebski
    0

    it depend on claudflare ssl mode, cloudflare doing ssl teremination. If it flexible website working on 80.

    you can define host header on homepage, techicle it should work with reading header from request

     app.UseForwardedHeaders(new ForwardedHeadersOptions
     {
         ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
     });
    
  • Marcus 41 posts 182 karma points
    4 days ago
    Marcus
    0

    Thank you Yakov,

    Let me try, do I need to push that line before/after any app. ? For example app.UseUmbraco()

  • Marcus 41 posts 182 karma points
    2 days ago
    Marcus
    0

    Hello Yakov,

    I tried but it still does not work. Do you have any other advice?

    Thanks!

    Marcus

  • Yakov Lebski 567 posts 2153 karma points
    1 day ago
    Yakov Lebski
    0

    before UseUmbraco

    Do you know how Cloudflare defined?

    The simple solution is add hostname to you website to be with https

  • Marcus 41 posts 182 karma points
    1 day ago
    Marcus
    0

    Hi Yakov,

    I will ask to try your advice

    Thank you

Please Sign in or register to post replies

Write your reply to:

Draft