http only for AWS

This commit is contained in:
John Mulhausen
2016-09-29 19:43:26 -07:00
parent b58c93bb40
commit 69b61e1fb9

7
404.md
View File

@@ -10,23 +10,18 @@ function doFwd() {
var portNumber = window.location.port;
var gonnaFwd = false;
var newURL = "";
console.log(forwardingURL,domainName,portNumber);
{% for item in site.data.docsarchive.docker-compose %}
if (forwardingURL.indexOf("/{{ item[0] }}") > -1)
{
console.log(domainName + ":"+ portNumber +"/{{ item[0] }}");
gonnaFwd = true;
if(portNumber.length > 0) {
console.log("Port!");
// there is a port number in the location; make sure to replace it
newURL = forwardingURL.replace(domainName + ":"+ portNumber +"/{{ item[0] }}","{{ page.archiveserver }}:{{ item[1].ports[0] | replace:':4000','' }}");
} else {
console.log("No port");
// no port number in the location; just foward them on
newURL = forwardingURL.replace(domainName + "/{{ item[0] }}","{{ page.archiveserver }}:{{ item[1].ports[0] | replace:':4000','' }}");
}
newURL = newURL.replace("https:","http:")
}{% endfor %}
if (gonnaFwd) {
console.log("Forwarding to: " + newURL);