From 1724567f3dfc3b4637aac7bdeb6633628e6a8335 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 17 Feb 2022 15:05:21 +0000 Subject: [PATCH] JAL-3959 add key retrieval urls that support CORS needed by JalviewJS --- src/jalview/bin/Jalview.java | 4 ++++ src/jalview/ws/dbsources/Pfam.java | 4 ++++ src/jalview/ws/dbsources/Rfam.java | 4 ++++ src/jalview/ws/ebi/EBIFetchClient.java | 4 +++- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 0c11808..4c018fb 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -95,6 +95,10 @@ public class Jalview static { Platform.getURLCommandArguments(); + Platform.addJ2SDirectDatabaseCall("https://www.jalview.org"); + Platform.addJ2SDirectDatabaseCall("http://www.jalview.org"); + Platform.addJ2SDirectDatabaseCall("http://www.compbio.dundee.ac.uk"); + Platform.addJ2SDirectDatabaseCall("https://www.compbio.dundee.ac.uk"); } /* diff --git a/src/jalview/ws/dbsources/Pfam.java b/src/jalview/ws/dbsources/Pfam.java index 47e66ac..456236a 100644 --- a/src/jalview/ws/dbsources/Pfam.java +++ b/src/jalview/ws/dbsources/Pfam.java @@ -22,6 +22,7 @@ package jalview.ws.dbsources; import jalview.bin.Cache; import jalview.datamodel.DBRefSource; +import jalview.util.Platform; import com.stevesoft.pat.Regex; @@ -43,6 +44,9 @@ abstract public class Pfam extends Xfam static final String PFAM_BASEURL_KEY = "PFAM_BASEURL"; private static final String DEFAULT_PFAM_BASEURL = "https://pfam.xfam.org"; + static { + Platform.addJ2SDirectDatabaseCall(DEFAULT_PFAM_BASEURL); + } public Pfam() { diff --git a/src/jalview/ws/dbsources/Rfam.java b/src/jalview/ws/dbsources/Rfam.java index c9ee7fc..04b3669 100644 --- a/src/jalview/ws/dbsources/Rfam.java +++ b/src/jalview/ws/dbsources/Rfam.java @@ -22,6 +22,7 @@ package jalview.ws.dbsources; import jalview.bin.Cache; import jalview.datamodel.DBRefSource; +import jalview.util.Platform; import com.stevesoft.pat.Regex; @@ -36,6 +37,9 @@ abstract public class Rfam extends Xfam private static final String DEFAULT_RFAM_BASEURL = "https://rfam.xfam.org"; + static { + Platform.addJ2SDirectDatabaseCall(DEFAULT_RFAM_BASEURL); + } /* * append to URLs to retrieve as a gzipped file */ diff --git a/src/jalview/ws/ebi/EBIFetchClient.java b/src/jalview/ws/ebi/EBIFetchClient.java index 1d04351..1f833d0 100644 --- a/src/jalview/ws/ebi/EBIFetchClient.java +++ b/src/jalview/ws/ebi/EBIFetchClient.java @@ -266,7 +266,9 @@ public class EBIFetchClient } return null; } - + static { + Platform.addJ2SDirectDatabaseCall("https://www.ebi.ac.uk/"); + } /** * Constructs the URL to fetch from * -- 1.7.10.2