Skip to content

Commit ad2121e

Browse files
committed
Always use https for fonts.googleapis.com
1 parent 33bec9d commit ad2121e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/webfontloader/demo/server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class Server < Sinatra::Base
88
DemoRoot = File.expand_path(File.join(File.dirname(__FILE__)))
99
ProjectRoot = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", ".."))
1010

11-
GoogleApi = "http://fonts.googleapis.com/css"
12-
GoogleFontApi = "http://themes.googleusercontent.com/font"
11+
GoogleApi = "https://fonts.googleapis.com/css"
12+
GoogleFontApi = "https://themes.googleusercontent.com/font"
1313

1414
set :app_file, __FILE__
1515
set :sessions, false

spec/modules/google/googlefontapi_spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('modules.google.GoogleFontApi', function () {
4242
});
4343

4444
it('has inserted the link element correctly', function () {
45-
expect(link).toEqual('http://fonts.googleapis.com/css?family=Font1%7CFont2');
45+
expect(link).toEqual('https://fonts.googleapis.com/css?family=Font1%7CFont2');
4646
});
4747

4848
it('has the correct families', function () {
@@ -91,7 +91,7 @@ describe('modules.google.GoogleFontApi', function () {
9191
});
9292

9393
it('has inserted the link element correctly', function () {
94-
expect(link).toEqual('http://fonts.googleapis.com/css?family=Font1+WithSpace%7CFont2+WithSpaceToo');
94+
expect(link).toEqual('https://fonts.googleapis.com/css?family=Font1+WithSpace%7CFont2+WithSpaceToo');
9595
});
9696
});
9797

@@ -104,7 +104,7 @@ describe('modules.google.GoogleFontApi', function () {
104104
});
105105

106106
it('has inserted the link element correctly', function () {
107-
expect(link).toEqual('http://fonts.googleapis.com/css?family=Font1+WithSpace:bi%7CFont2+WithSpaceToo:b,r');
107+
expect(link).toEqual('https://fonts.googleapis.com/css?family=Font1+WithSpace:bi%7CFont2+WithSpaceToo:b,r');
108108
});
109109
});
110110
});

src/modules/google/fontapiurlbuilder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ webfont.modules.google.FontApiUrlBuilder = function(apiUrl, protocol, text) {
1515
};
1616

1717

18-
webfont.modules.google.FontApiUrlBuilder.DEFAULT_API_URL = '//fonts.googleapis.com/css';
18+
webfont.modules.google.FontApiUrlBuilder.DEFAULT_API_URL = 'https://fonts.googleapis.com/css';
1919

2020
goog.scope(function () {
2121
var FontApiUrlBuilder = webfont.modules.google.FontApiUrlBuilder;

0 commit comments

Comments
 (0)