Copied to clipboard

Flag this post as spam?

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


  • ks 19 posts 137 karma points
    Mar 23, 2016 @ 09:30
    ks
    0

    Image is not load with Custom Header setting.

    In web.config setting I have this set in the custom header

        <customHeaders>
           <remove name="X-Powered-By" />
          <add name="X-Frame-Options" value="DENY" />
          <add name="X-XSS-Protection" value="1; mode=block" />
          <add name="X-Content-Type-Options" value="nosniff" />
      </customHeaders>
    

    and if I add line following

    <add name="X-Content-Type-Options" value="nosniff" />
    

    In Internet Explorer it can't load the image.enter image description here

    *Umbraco version 7.2.8

    *Slimsy version 1.1.5

    and this the method I used

    <div>
        <div>
        <img  style="max-width: 100%"  src="@media.GetResponsiveImageUrl(600, 0)" alt="">
        </div>
    </div>
    

    So I wonder what exactly this config line does, and what consequeces it could bring if I remove this config.

  • Sebastiaan Janssen 4882 posts 14556 karma points MVP admin hq
    Mar 24, 2016 @ 12:12
    Sebastiaan Janssen
    0

    If it's a PNG file, it may be this issue, but I'm not sure if Slimsy uses the thumbnail (wouldn't think so): http://issues.umbraco.org/issue/U4-6873

  • ks 19 posts 137 karma points
    Mar 25, 2016 @ 03:39
    ks
    0

    I tried with both png and jpg files; images don't show in neither format

    enter image description here

  • Sebastiaan Janssen 4882 posts 14556 karma points MVP admin hq
    Mar 25, 2016 @ 09:45
    Sebastiaan Janssen
    0

    I've tried the exact same code and it works for me for both .jpg and .png files. Maybe try to check the network tab to see what's going on? Or try to use Fiddler instead, to see if there's an error.

    One thing to note: you might want to set your X-Frame-Options to SAMEORIGIN because some of the backoffice still uses iframes and will stop working if you set it to DENY.

Please Sign in or register to post replies

Write your reply to:

Draft