secure url for images

2 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 03 Dec 2018 Link to this post

    Hi Guys

    Following the big GDPR push I have converted sites to use https via asp.net code EG;

    If Not Request.IsSecureConnection Then
    Response.Redirect(Request.Url.AbsoluteUri.Replace("http://", "https://"))
    End If

    Piece of cake!

    But images seem to show as insecure content and browsers do not show the desired padlock.

    Running the Firefox web console I see that the offending item is the RadRotor image urls which are not shown in https format and thus provoke the insecure/mixed content warnings. I guess this could be fixed by using the full absolute url but then the development version and the public version would be different, which sucks.

    There has to be way round this without using absolute urls rather than relative ones (eg ImageUrl="~/images/image1.png")

    Suggestions please!

     

    Thanks

     

    Clive

  2. Rumen
    Admin
    Rumen avatar
    14011 posts

    Posted 06 Dec 2018 Link to this post

    Hi Clive,

    I would personally go with the absolute urls approach since it works properly.

    You may want also to check this idea for the other approach: Redirect http to https in default.aspx.



    Regards,
    Rumen
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top