locked
The request has been blocked the content must be served over https RRS feed

  • Question

  • User-1355965324 posted

    Hi

    When I run the application in in target frame work 3.1 , the following error is showed when I debug the application . It would be very appreciated if some one can help me to resolve .

    with Thanks

    Pol

    Mixed Content: The page at 'https://localhost:22380/' was loaded over HTTPS, but requested an insecure font 'http://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.woff2'. This request has been blocked; the content must be served over HTTPS.

    Tuesday, December 29, 2020 10:58 PM

Answers

  • User1312693872 posted

    Hi,polachan

    The reason why you have this problem is because your site is running on https protocol while your fonts are using http protocol for url.

    And the solution is change the http to https, only change the main url will not help because it has more url in it:

    So a straight way is, copy the content in that url to your css file and change http to https, then the error will gone:

    ***.css

    @font-face { font-family: "custom-001"; src: url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.eot"); /* IE9*/ src: url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */ url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.woff2") format("woff2"), /* chrome firefox */ url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.woff") format("woff"), /* chrome firefox */ url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.ttf") format("truetype"), /* chrome firefox opera Safari, Android, iOS 4.2+*/ url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.svg#custom-001") format("svg"); /* iOS 4.1- */ }

    ...

    Best Regards,

    Jerry Cai

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 30, 2020 9:55 AM

All replies

  • User475983607 posted

    You have file references that start with http as clearly and open explained in the error message.  Anyway, change http to https.  

    Tuesday, December 29, 2020 11:03 PM
  • User-1355965324 posted

    thanks for the reply when I search the entire project , I can see  only the statement has been given in one place as given below

    @import url(//db.onlinewebfonts.com/c/d866d1b97392f17f9abb424d7314c559?family=custom-001);

    I changed  the above code as given, still it is not working

    @import url('https://db.onlinewebfonts.com/c/d866d1b97392f17f9abb424d7314c559?family=custom-001');

    Wednesday, December 30, 2020 7:38 AM
  • User1312693872 posted

    Hi,polachan

    The reason why you have this problem is because your site is running on https protocol while your fonts are using http protocol for url.

    And the solution is change the http to https, only change the main url will not help because it has more url in it:

    So a straight way is, copy the content in that url to your css file and change http to https, then the error will gone:

    ***.css

    @font-face { font-family: "custom-001"; src: url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.eot"); /* IE9*/ src: url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */ url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.woff2") format("woff2"), /* chrome firefox */ url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.woff") format("woff"), /* chrome firefox */ url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.ttf") format("truetype"), /* chrome firefox opera Safari, Android, iOS 4.2+*/ url("https://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.svg#custom-001") format("svg"); /* iOS 4.1- */ }

    ...

    Best Regards,

    Jerry Cai

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 30, 2020 9:55 AM