Skip to content

Commit 6c2e6d4

Browse files
author
Germain
committed
fix: call hangman API over HTTPS
Browsers now enforce some stricter mixed content rules which blocks HTTP requests when the page is loaded over HTTPS
1 parent a7b2ec9 commit 6c2e6d4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/hangman/script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function newGame() {
22
$.ajax({
33
type: "POST",
4-
url: "http://hangman-api.herokuapp.com/hangman",
4+
url: "https://hangman-api.herokuapp.com/hangman",
55
}).done(function(data) {
66
$('.hangman-word').text(data.hangman);
77
$('.token').text(data.token);
@@ -14,7 +14,7 @@ function guess(token, letter) {
1414
$.ajax({
1515
type: "PUT",
1616
dataType: 'json',
17-
url: "http://hangman-api.herokuapp.com/hangman",
17+
url: "https://hangman-api.herokuapp.com/hangman",
1818
data: { "token": token, "letter": letter},
1919
beforeSend: function() {
2020
$(".letter").prop('disabled', true);
@@ -42,7 +42,7 @@ function getSolution(token) {
4242
$.ajax({
4343
type: "GET",
4444
dataType: 'json',
45-
url: "http://hangman-api.herokuapp.com/hangman",
45+
url: "https://hangman-api.herokuapp.com/hangman",
4646
data: { "token": token },
4747
}).done(function(data) {
4848
var hangman_word = $('.hangman-word').text();

0 commit comments

Comments
 (0)