Changeset 35936


Ignore:
Timestamp:
2022-01-09T16:43:29+13:00 (2 years ago)
Author:
davidb
Message:

Code change to dynamically configure based on host-domain name is URL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/eurovision.js

    r35860 r35936  
    511511
    512512// endpoint
    513 var endpoint_url="//localhost:4040/greenstone/query"; // **** External IP? ****
    514 //var endpoint_url="//so-we-must-think.space/greenstone3-lod3/greenstone/query";
     513var endpoint_url = null;
     514
     515// Note: the following will include the port number, if used in URL
     516var host_domain = window.location.host;
     517
     518if ((host_domain== "so-we-must-think.space") || (host_domain== "sowemustthink.space")) {
     519    endpoint_url="//" + host_domain + "/greenstone3-lod3/greenstone/query";
     520    console.log("Triggering on hostname: " + host_domain)
     521    console.log("=> setting sparql-endpoint to: '" + endpoint_url) + "'";
     522}
     523else {
     524    endpoint_url="//localhost:4040/greenstone/query";
     525}
     526
    515527
    516528function ajaxpick_random_entrant() {
Note: See TracChangeset for help on using the changeset viewer.