Skip to content

Commit

Permalink
Merge pull request #273 from JULIELab/cors
Browse files Browse the repository at this point in the history
Cors
  • Loading branch information
khituras authored Jul 13, 2024
2 parents e0db620 + f1e1692 commit a1aa6be
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public JSONObject getWidgetSettings() {
widgetSettings.put("handleId", getResizeHandleId());
widgetSettings.put("widgetId", clientId);
widgetSettings.put("viewMode", "small");
widgetSettings.put("toggleViewModeUrl", toggleViewModeEventLink.toAbsoluteURI());
widgetSettings.put("refreshContentsUrl", refreshContentEventLink.toAbsoluteURI());
widgetSettings.put("toggleViewModeUrl", toggleViewModeEventLink.toAbsoluteURI().replace(":80", ""));
widgetSettings.put("refreshContentsUrl", refreshContentEventLink.toAbsoluteURI().replace(":80", ""));
widgetSettings.put("zoneElementId", widgetZone.getClientId());
widgetSettings.put("useTapestryZoneUpdates", useTapestryZoneUpdates);
widgetSettings.put("dataSessionId", requestData.getDataSessionId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public String getArgumentLink(int argPosition) {

public void afterRender() {
final Link downloadEventLink = resources.createEventLink("download");
javaScriptSupport.require("gepi/charts/tablewidget").invoke("download").with(downloadEventLink.toAbsoluteURI());
javaScriptSupport.require("gepi/charts/tablewidget").invoke("download").with(downloadEventLink.toAbsoluteURI().replace(":80", ""));
javaScriptSupport.require("gepi/charts/tablewidget").invoke("setupHighlightTooltips");
javaScriptSupport.require("gepi/base").invoke("setuptooltips");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public Future<EventRetrievalResult> getUnrolledResult4download() {

void afterRender() {
javaScriptSupport.require("gepi/base").invoke("setuptooltips");
javaScriptSupport.require("gepi/charts/data").invoke("setDataUrl").with(resources.createEventLink("loadDataToClient").toAbsoluteURI());
javaScriptSupport.require("gepi/charts/data").invoke("setDataUrl").with(resources.createEventLink("loadDataToClient").toAbsoluteURI().replace(":80", ""));
javaScriptSupport.require("gepi/pages/index").invoke("setupDownloadUrlCopyButton");
if (isResultPresent()) {
// If there already is data at loading the page, the input panel is already hidden (see #getShowInputClass)
Expand Down Expand Up @@ -471,7 +471,7 @@ private boolean isBList() {
private PageRenderLinkSource pageRenderLS;

public String getResultFileDownloadLink() {
return pageRenderLS.createPageRenderLinkWithContext(ResultDownload.class, dataSessionId).toAbsoluteURI();
return pageRenderLS.createPageRenderLinkWithContext(ResultDownload.class, dataSessionId).toAbsoluteURI().replace(":80", "");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public static void contributeFactoryDefaults(
// in the early stages of development.
configuration.override(SymbolConstants.PRODUCTION_MODE, true);

configuration.override(SymbolConstants.CORS_ENABLED, true);
configuration.override(SymbolConstants.CORS_ALLOWED_ORIGINS, "*");
// configuration.override(SymbolConstants.CORS_ENABLED, true);
// configuration.override(SymbolConstants.CORS_ALLOWED_ORIGINS, "*");
configuration.add(SymbolConstants.CORS_MAX_AGE, "5");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ define(['jquery', 't5/core/zone', 'gepi/pages/index'], function($, zoneManager,

Widget.prototype.ajaxRefresh = function() {
console.log('[trace] Issueing update of zone with ID ' + this.zoneElementId);
index.getReadySemaphor().done(() => zoneManager.deferredZoneUpdate(this.zoneElementId, this.refreshContentsUrl));
index.getReadySemaphor().done(() => zoneManager.deferredZoneUpdate(this.zoneElementId, this.refreshContentsUrl.replace(":80", "")));
console.log('[trace] Returned from update of zone with ID ' + this.zoneElementId);
};

Expand Down

0 comments on commit a1aa6be

Please sign in to comment.