From 8fd54b1b8dd9ef79df366525cba4dc4402a36c6e Mon Sep 17 00:00:00 2001
From: Pierre-Yves B <PyvesDev@gmail.com>
Date: Sun, 22 Aug 2021 17:20:59 +0100
Subject: [PATCH] Switch all shields.io links to https (#6935)

---
 README.md                                      |  2 +-
 app.json                                       |  2 +-
 badge-maker/package.json                       |  2 +-
 core/server/influx-metrics.spec.js             | 12 ++++++------
 doc/production-hosting.md                      |  2 +-
 frontend/components/development/style-page.tsx |  2 +-
 frontend/package.json                          |  2 +-
 package.json                                   |  2 +-
 services/website/website.tester.js             |  4 ++--
 spec/motivation.md                             |  2 +-
 10 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/README.md b/README.md
index 770d9e378e..6e9e8fb28f 100644
--- a/README.md
+++ b/README.md
@@ -73,7 +73,7 @@ This repo hosts:
 [Make your own badges!][custom badges]
 (Quick example: `https://img.shields.io/badge/left-right-f39f37`)
 
-[custom badges]: http://shields.io/#your-badge
+[custom badges]: https://shields.io/#your-badge
 
 ### Quickstart
 
diff --git a/app.json b/app.json
index ad5f008a5d..c3557c7164 100644
--- a/app.json
+++ b/app.json
@@ -4,7 +4,7 @@
   "keywords": ["badge", "github", "svg", "status"],
   "website": "https://shields.io/",
   "repository": "https://github.com/badges/shields",
-  "logo": "http://shields.io/favicon.png",
+  "logo": "https://shields.io/favicon.png",
   "env": {
     "CYPRESS_INSTALL_BINARY": {
       "description": "Disable the cypress binary installation",
diff --git a/badge-maker/package.json b/badge-maker/package.json
index 7602f5d707..fc6702acb7 100644
--- a/badge-maker/package.json
+++ b/badge-maker/package.json
@@ -21,7 +21,7 @@
   "bugs": {
     "url": "https://github.com/badges/shields/issues"
   },
-  "homepage": "http://shields.io",
+  "homepage": "https://shields.io",
   "bin": {
     "badge": "lib/badge-cli.js"
   },
diff --git a/core/server/influx-metrics.spec.js b/core/server/influx-metrics.spec.js
index 529edeaaeb..f7d7cba7d0 100644
--- a/core/server/influx-metrics.spec.js
+++ b/core/server/influx-metrics.spec.js
@@ -87,7 +87,7 @@ describe('Influx metrics', function () {
     })
 
     it('should send metrics', async function () {
-      const scope = nock('http://shields-metrics.io/', {
+      const scope = nock('https://shields-metrics.io/', {
         reqheaders: {
           'Content-Type': 'application/x-www-form-urlencoded',
         },
@@ -101,7 +101,7 @@ describe('Influx metrics', function () {
         .reply(200)
       process.env.INSTANCE_ID = 'instance2'
       influxMetrics = new InfluxMetrics(metricInstance, {
-        url: 'http://shields-metrics.io/metrics',
+        url: 'https://shields-metrics.io/metrics',
         timeoutMillseconds: 100,
         intervalSeconds: 0.001,
         username: 'metrics-username',
@@ -132,7 +132,7 @@ describe('Influx metrics', function () {
     })
 
     const influxMetrics = new InfluxMetrics(metricInstance, {
-      url: 'http://shields-metrics.io/metrics',
+      url: 'https://shields-metrics.io/metrics',
       timeoutMillseconds: 50,
       intervalSeconds: 0,
       username: 'metrics-username',
@@ -149,14 +149,14 @@ describe('Influx metrics', function () {
           .and(
             sinon.match.has(
               'message',
-              'Cannot push metrics. Cause: RequestError: Nock: Disallowed net connect for "shields-metrics.io:80/metrics"'
+              'Cannot push metrics. Cause: RequestError: Nock: Disallowed net connect for "shields-metrics.io:443/metrics"'
             )
           )
       )
     })
 
     it('should log error responses', async function () {
-      nock('http://shields-metrics.io/').persist().post('/metrics').reply(400)
+      nock('https://shields-metrics.io/').persist().post('/metrics').reply(400)
 
       await influxMetrics.sendMetrics()
 
@@ -166,7 +166,7 @@ describe('Influx metrics', function () {
           .and(
             sinon.match.has(
               'message',
-              'Cannot push metrics. http://shields-metrics.io/metrics responded with status code 400'
+              'Cannot push metrics. https://shields-metrics.io/metrics responded with status code 400'
             )
           )
       )
diff --git a/doc/production-hosting.md b/doc/production-hosting.md
index f6e2e76800..a1b2fd0399 100644
--- a/doc/production-hosting.md
+++ b/doc/production-hosting.md
@@ -102,7 +102,7 @@ hosted on [Zeit Now][]. It's managed in the
 
 Both the badge server and frontend are served from Heroku.
 
-After merging a commit to master, heroku should create a staging deploy. Check this has deployed correctly in the `shields-staging` pipeline and review http://shields-staging.herokuapp.com/
+After merging a commit to master, heroku should create a staging deploy. Check this has deployed correctly in the `shields-staging` pipeline and review https://shields-staging.herokuapp.com/
 
 If we're happy with it, "promote to production". This will deploy what's on staging to the `shields-production-eu` and `shields-production-us` pieplines.
 
diff --git a/frontend/components/development/style-page.tsx b/frontend/components/development/style-page.tsx
index bf4e14d3a9..a6266ae546 100644
--- a/frontend/components/development/style-page.tsx
+++ b/frontend/components/development/style-page.tsx
@@ -139,7 +139,7 @@ function StyleTable({ style }: { style: string }): JSX.Element {
             <td>
               <Badges
                 badges={badges}
-                baseUrl="http://img.shields.io"
+                baseUrl="https://img.shields.io"
                 style={style}
               />
             </td>
diff --git a/frontend/package.json b/frontend/package.json
index deaac236c6..eca2ac4608 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -3,7 +3,7 @@
   "version": "0.0.0",
   "description": "Shields.io frontend",
   "private": true,
-  "homepage": "http://shields.io",
+  "homepage": "https://shields.io",
   "license": "CC0-1.0",
   "repository": {
     "type": "git",
diff --git a/package.json b/package.json
index 340e90730e..284992aaec 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,7 @@
     "image",
     "shields.io"
   ],
-  "homepage": "http://shields.io",
+  "homepage": "https://shields.io",
   "bugs": {
     "url": "https://github.com/badges/shields/issues",
     "email": "thaddee.tyl@gmail.com"
diff --git a/services/website/website.tester.js b/services/website/website.tester.js
index 95d2caeac1..c70a206e68 100644
--- a/services/website/website.tester.js
+++ b/services/website/website.tester.js
@@ -12,12 +12,12 @@ t.create('status of https://shields.io')
   .expectBadge({ label: 'website', message: 'up', color: 'brightgreen' })
 
 t.create('status of nonexistent domain')
-  .get('/website.json?url=http://shields.io.io')
+  .get('/website.json?url=https://shields.io.io')
   .timeout(15000)
   .expectBadge({ label: 'website', message: 'down', color: 'red' })
 
 t.create('status when network is off')
-  .get('/website.json?url=http://shields.io')
+  .get('/website.json?url=https://shields.io')
   .networkOff()
   .expectBadge({ label: 'website', message: 'down', color: 'red' })
 
diff --git a/spec/motivation.md b/spec/motivation.md
index 03c95de6b6..4c42f53cd1 100644
--- a/spec/motivation.md
+++ b/spec/motivation.md
@@ -29,4 +29,4 @@ As you can see below, without increasing the footprint of these badges, I've tri
 
 ![Badge design](proportions.png)
 
-This badge design corresponds to an old and now deprecated version which has since been replaced by beautiful and scalable SVG versions that can be found on [shields.io](http://shields.io)
+This badge design corresponds to an old and now deprecated version which has since been replaced by beautiful and scalable SVG versions that can be found on [shields.io](https://shields.io)
-- 
GitLab