From 815fc903eafb15d2a8abc4c99f5a593899e8e560 Mon Sep 17 00:00:00 2001 From: Anton Polishko Date: Mon, 22 Jun 2020 01:14:35 -0700 Subject: [PATCH] quick fix for broken doi links convert refDoc['doi'] to proper url via DOI proxy server official doc: https://www.doi.org/factsheets/DOIProxy.html#resolving --- app/services/sheets/cord-row-population.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/sheets/cord-row-population.js b/app/services/sheets/cord-row-population.js index 19d6a40..d03725d 100644 --- a/app/services/sheets/cord-row-population.js +++ b/app/services/sheets/cord-row-population.js @@ -45,10 +45,10 @@ export default function cordRowPopulation() { }; } -function resolveHttpProtocol(str, defProtocol ='http') { +function resolveHttpProtocol(str, defProtocol ='https') { if (/^http/.test(str)) { return str; } - return `${defProtocol}://${str}`; + return `${defProtocol}://doi.org/${str}`; }