@tryghost/config-url-helpers 0.1.6 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,16 +27,11 @@ function getSubdir() {
27
27
  * Imagine Ghost runs with http, but nginx allows SSL connections.
28
28
  *
29
29
  * @callback getSiteUrlFn
30
- * @param {boolean} [secure] optionally force the url to be secure
31
30
  * @return {string} returns the url as defined in config, but always with a trailing `/`
32
31
  */
33
- function getSiteUrl(secure = false) {
32
+ function getSiteUrl() {
34
33
  let siteUrl = this.get('url');
35
34
 
36
- if (secure) {
37
- siteUrl = siteUrl.replace('http://', 'https://');
38
- }
39
-
40
35
  if (!siteUrl.match(/\/$/)) {
41
36
  siteUrl += '/';
42
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/config-url-helpers",
3
- "version": "0.1.6",
3
+ "version": "1.0.0",
4
4
  "repository": "https://github.com/TryGhost/Utils/tree/main/packages/config-url-helpers",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -21,9 +21,9 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "c8": "7.11.2",
24
- "mocha": "9.1.3",
24
+ "mocha": "10.0.0",
25
25
  "should": "13.2.3",
26
- "sinon": "11.1.2"
26
+ "sinon": "14.0.0"
27
27
  },
28
- "gitHead": "8d69959c131f54d10ccdb12bc8b45db46162a4f6"
28
+ "gitHead": "01d8bb085a180fc7166b12d159530c4880b6d6f1"
29
29
  }