From 3918bc5099f3ff85dfa62fa04a7937fd443b7d4e Mon Sep 17 00:00:00 2001 From: Erik Kieckhafer Date: Thu, 26 Aug 2021 11:42:11 -0700 Subject: [PATCH] use // in place of http to default to same protocal I was experiencing an issue where my site, which uses `HTTPS`, was throwing an error because the default url for the API is `HTTP`. Updating this to use `//` will use the same protocol as the website your package is used on, which should fix this issue. --- src/wiki.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wiki.js b/src/wiki.js index 7deac56..3f380c9 100644 --- a/src/wiki.js +++ b/src/wiki.js @@ -20,7 +20,7 @@ import QueryChain from './chain'; * will be set. */ const defaultOptions = { - apiUrl: 'http://en.wikipedia.org/w/api.php', + apiUrl: '//en.wikipedia.org/w/api.php', origin: '*' };