INL / GTB-html

GTB zonder Flash
0 stars 0 forks source link

base URLs in index.html without protocol/servername? #56

Closed jan-niestadt closed 6 years ago

jan-niestadt commented 6 years ago

In index.html, I now have to specify the protocol and servername, or searching doesn't work.

stylesheetParams: {
    baseArticleURL: "http://172.16.4.37/iWDB/search?actie=article",
    baseArticleContentURL: "http://172.16.4.37/iWDB/search?actie=article_content",
    baseSearchURL: "http://172.16.4.37/iWDB/search?actie=results",
    baseListURL: "http://172.16.4.37/iWDB/search?actie=list",
    gaTrackingCode: "UA-57793092-1"
}

It would be much nicer if it were possible to specify only the path, which should work because the backend and frontend run on the same server:

stylesheetParams: {
    baseArticleURL: "/iWDB/search?actie=article",
    baseArticleContentURL: "/iWDB/search?actie=article_content",
    baseSearchURL: "/iWDB/search?actie=results",
    baseListURL: "/iWDB/search?actie=list",
    gaTrackingCode: "UA-57793092-1"
}
pmasereeuw commented 6 years ago

Ik moet dit nakijken, want ik denk dat ik de absolute URL's nodig heb in mijn ontwikkelomgeving (met het redirect-achtige PHP-script). Eventueel zou ik natuurlijk kunnen testen of de parameter met http begint....

jan-niestadt commented 6 years ago

(sorry voor het Engels, ik ben BlackLab gewend, ging automatisch :-) Fijn als je het even wilt nakijken. Ik snap dat het in jouw ontwikkelomgeving misschien nodig is, maar het is wel fijn als we het voor productie (en voor een ontwikkelserver waar de backend ook draait) gewoon /iWDB/... kunnen gebruiken.

pmasereeuw commented 6 years ago

@jan-niestadt Kun jij dit testen? Ik ruik aan de parameter en als die niet met ^https?:// matcht, plak ik hostname en protocol (met wat leestekens) voor wat je in de parameter instelt. Zelf kan ik alleen testen met localhost...

pmasereeuw commented 6 years ago

Er ging iets fout, ik had niet gezien dat JS location.protocol een dubbele punt heeft (dus http: ipv http). Opgelost

jan-niestadt commented 6 years ago

Top!