Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,12 @@ public void initSRCEndpoints() {
String repoServiceUrl = synapseProperties.getSynapseProperty(
REPO_SERVICE_URL_KEY
);
String repoUrl =
repoServiceUrl.substring(0, repoServiceUrl.indexOf("/repo/")) + "/";
// SRC's path constants already begin with a slash (e.g. "/repo/v1"), so the
// endpoint must not end with one.
String repoUrl = repoServiceUrl.substring(
0,
repoServiceUrl.indexOf("/repo/")
);
String portalUrl = gwt.getHostPrefix();
if (!portalUrl.endsWith("/")) {
portalUrl += "/";
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/Portal.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<meta
http-equiv="Content-Security-Policy"
content="default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' *.synapse.org *.sagebase.org *.googleapis.com *.gstatic.com *.googletagmanager.com cdn.statuspage.io s3.amazonaws.com www.google-analytics.com kh896k90gyvg.statuspage.io *.youtube.com *.rstudio.com *.google.com *.shinyapps.io *.smartsheet.com sagebionetworks.jira.com 127.0.0.1:9876 localhost:5173 googleads.g.doubleclick.net www.googleadservices.com *.contentsquare.net airtable.com *.airtable.com; frame-ancestors 'self' https://*.synapse.org localhost; img-src * data: blob:; connect-src https://* http://127.0.0.1:8888 http://localhost:5173 ws://localhost:5173 wss://*.execute-api.us-east-1.amazonaws.com"
content="default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' *.synapse.org *.sagebase.org *.googleapis.com *.gstatic.com *.googletagmanager.com cdn.statuspage.io s3.amazonaws.com www.google-analytics.com kh896k90gyvg.statuspage.io *.youtube.com *.rstudio.com *.google.com *.shinyapps.io *.smartsheet.com sagebionetworks.jira.com 127.0.0.1:9876 localhost:5173 googleads.g.doubleclick.net www.googleadservices.com *.contentsquare.net airtable.com *.airtable.com; frame-ancestors 'self' https://*.synapse.org localhost; img-src * data: blob:; connect-src https://* http://127.0.0.1:8888 http://localhost:5173 http://localhost:8080 http://127.0.0.1:8080 ws://localhost:5173 wss://*.execute-api.us-east-1.amazonaws.com"
/>
<meta
name="google-site-verification"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public class GlobalApplicationStateImplTest {
Runnable mockRunnable;

public static final String REPO_ENDPOINT =
"https://repo-staging.prod.sagebase.org/";
"https://repo-staging.prod.sagebase.org";
public static final String SWC_ENDPOINT = "https://staging.synapse.org/";

@Before
Expand Down Expand Up @@ -154,7 +154,7 @@ public void before() {
globalApplicationState.setPlaceController(mockPlaceController);
globalApplicationState.setAppPlaceHistoryMapper(mockAppPlaceHistoryMapper);
when(mockSynapseProperties.getSynapseProperty(REPO_SERVICE_URL_KEY))
.thenReturn(REPO_ENDPOINT + "repo/v1");
.thenReturn(REPO_ENDPOINT + "/repo/v1");
when(mockGWT.getHostPrefix()).thenReturn(SWC_ENDPOINT);
}

Expand Down
Loading