Copied to clipboard

Flag this post as spam?

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


  • Simon 692 posts 1068 karma points
    Feb 19, 2016 @ 12:30
    Simon
    0

    Optimus Bundle Link Rendering for HTTPS

    Hi Guys,

    I was bundling a group of .js files and when it was rendered, since my site is using HTTPS, an error occurred since the site requested a script though HTTP, which is the link for the bundle.

    Any idea how to slve it.?

    Thanks you.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Feb 19, 2016 @ 12:41
    Tim Geyssens
    0

    Checking now, might be a setting we need to switch somewhere

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Feb 19, 2016 @ 12:42
    Tim Geyssens
    0

    Hmm it should render a relative path, how does the script tag look that gets rendered?

  • Simon 692 posts 1068 karma points
    Feb 19, 2016 @ 12:55
    Simon
    0

    Currently, I using this:

    @Scripts.RenderFormat("<script type=\"text/javascript\" src=\"{0}\"></script>", "~/bundles/HeadBundle") 
    

    . Locally is working fine, obliviously, but online not.

    I also tried the just RenderScript method.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Feb 19, 2016 @ 13:05
    Tim Geyssens
    0

    And how does the rendered result look? I thought it was relative

  • Simon 692 posts 1068 karma points
    Feb 19, 2016 @ 13:13
  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Feb 19, 2016 @ 13:24
    Tim Geyssens
    0

    Hmm from what I can find it will use the same HTTP scheme as the one used to request the main page, any chance I can take a look at the site tim at nibble dot be

  • Simon 692 posts 1068 karma points
    Feb 19, 2016 @ 13:25
    Simon
    0

    Appreciate any solution.

    Thanks Tim

  • Neil Hodges 320 posts 926 karma points
    Oct 21, 2016 @ 10:31
    Neil Hodges
    0

    Hi

    Any solution to this? Im getting the same problem. Ive setup a self signed cert locally to mimic HTTPS and works fine.

    When i deploy to the liver server i,m getting lots of 404 errors and errors pertaining to files being served over HTTP and not HTTPS

    Cheers Neil.

  • Neil Hodges 320 posts 926 karma points
    Oct 21, 2016 @ 10:53
    Neil Hodges
    1

    Ok seem's in my case there was a problem with a url re write rule.

    The rule was adding a trailing slash, see below how i negated the bundles folder.

        <rule name="Add trailing slash" enabled="true" stopProcessing="true">
          <match url="(.*[^/])$" ignoreCase="true" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_URI}" pattern="^/umbraco/" negate="true" />
            <add input="{REQUEST_URI}" pattern="^/bundles/" negate="true" />  <--------- ADDING THIS HERE WORKS
            <add input="{REQUEST_URI}" pattern="^/([0-9]+).aspx" negate="true" />
            <add input="{URL}" pattern="^.*\.(asp|aspx|axd|asmx|css|js|jpg|jpeg|png|gif|mp3)$" negate="true" ignoreCase="true" />
            <add input="{URL}" pattern="/Base" negate="true" />
            <add input="{URL}" pattern="cdv=1" negate="true" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="{R:1}/" />
        </rule>
    

    Hope this may help someone in the future if they experience the same problem.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Oct 21, 2016 @ 11:15
    Tim Geyssens
    0

    Thanks for sharing the problem and solution :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies