From 25f2ecd66a4aa8553e7bd021f28bab8181b6e061 Mon Sep 17 00:00:00 2001 From: Abdulrhmn Ghanem Date: Wed, 16 Nov 2022 12:55:14 +0200 Subject: [PATCH] squash! work around SSL error in production --- frontend/next.config.js | 10 +++++++--- .../pages/[user]/[repo]/[project]/1-click-BOM.tsv.jsx | 5 ----- 2 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 frontend/src/pages/[user]/[repo]/[project]/1-click-BOM.tsv.jsx diff --git a/frontend/next.config.js b/frontend/next.config.js index 97abec8f6d..6681209b23 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -59,9 +59,13 @@ module.exports = async phase => { }, async redirects() { const sslWorkaround = url => { - url = new URL(url) - url.protocol = 'http:' - return url.toString().slice(0, -1) // remove the trailing slash + try { + url = new URL(url) + url.protocol = 'http:' + return url.toString().slice(0, -1) // remove the trailing slash + } catch (e) { + return url + } } // we use "_" as the project name when there is only one project but we // don't want it to appear in the URL of the project page diff --git a/frontend/src/pages/[user]/[repo]/[project]/1-click-BOM.tsv.jsx b/frontend/src/pages/[user]/[repo]/[project]/1-click-BOM.tsv.jsx deleted file mode 100644 index fd58816ccb..0000000000 --- a/frontend/src/pages/[user]/[repo]/[project]/1-click-BOM.tsv.jsx +++ /dev/null @@ -1,5 +0,0 @@ -const OneClickBomTSV = () => { - return null -} - -export default OneClickBomTSV \ No newline at end of file