MyBB Community Forums

Full Version: Enabled HSTS on my forum, fonts are messed up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, so I enabled HSTS on my forum (only allows HTTPS requests from anything basically), but since Google's fonts API is using HTTP it's not loading the font, same for the jQuery, how do I change it to HTTPS?

These are the ones that I want to change, where do I change them to HTTPS from?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Exo+2:400,600' rel='stylesheet' type='text/css'>
Thanks
(2016-07-14, 07:50 AM)Voice Wrote: [ -> ]Hello, so I enabled HSTS on my forum (only allows HTTPS requests from anything basically), but since Google's fonts API is using HTTP it's not loading the font, same for the jQuery, how do I change it to HTTPS?

These are the ones that I want to change, where do I change them to HTTPS from?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Exo+2:400,600' rel='stylesheet' type='text/css'>
Thanks

Change that code to:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link href='//fonts.googleapis.com/css?family=Exo+2:400,600' rel='stylesheet' type='text/css'>
(2016-07-14, 09:46 AM)Euan T Wrote: [ -> ]
(2016-07-14, 07:50 AM)Voice Wrote: [ -> ]Hello, so I enabled HSTS on my forum (only allows HTTPS requests from anything basically), but since Google's fonts API is using HTTP it's not loading the font, same for the jQuery, how do I change it to HTTPS?

These are the ones that I want to change, where do I change them to HTTPS from?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Exo+2:400,600' rel='stylesheet' type='text/css'>
Thanks

Change that code to:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link href='//fonts.googleapis.com/css?family=Exo+2:400,600' rel='stylesheet' type='text/css'>

Thanks, but in which file?
It's usually located in the headerinclude template (under Ungrouped Templates) of your forum's style.
You can use HTML comments displayed in the page source to trace which template contains given part (you might have to enable it in Output template start/end comments? in Server and Optimization Options).
(2016-07-14, 09:46 AM)Euan T Wrote: [ -> ]
(2016-07-14, 07:50 AM)Voice Wrote: [ -> ]Hello, so I enabled HSTS on my forum (only allows HTTPS requests from anything basically), but since Google's fonts API is using HTTP it's not loading the font, same for the jQuery, how do I change it to HTTPS?

These are the ones that I want to change, where do I change them to HTTPS from?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Exo+2:400,600' rel='stylesheet' type='text/css'>
Thanks

Change that code to:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link href='//fonts.googleapis.com/css?family=Exo+2:400,600' rel='stylesheet' type='text/css'>

(2016-07-14, 12:46 PM)Devilshakerz Wrote: [ -> ]It's usually located in the headerinclude template (under Ungrouped Templates) of your forum's style.
You can use HTML comments displayed in the page source to trace which template contains given part (you might have to enable it in Output template start/end comments? in Server and Optimization Options).

Yep I got it, thanks so much you two! Greatly appreciate it.