Commit 9e5f6745 authored by Mikaël Salson's avatar Mikaël Salson

main.js: Use DB_ADDRESS only if use_database is set and true.

No reason to require that the cgi_address is set to use the DB_ADDRESS.
parent 563112da
......@@ -7,15 +7,15 @@ var CGI_ADDRESS = "http://127.0.1.1/cgi-bin/";
if (typeof config != 'undefined') {
if (config.cgi_address){
if (config.cgi_address) CGI_ADDRESS = config.cgi_address
if (config.cgi_address == "default") CGI_ADDRESS = "http://"+window.location.hostname+"/cgi/"
}
if (config.use_database != undefined && config.use_database) {
if (config.db_address) { DB_ADDRESS = config.db_address}
if (config.db_address == "default") DB_ADDRESS = "https://"+window.location.hostname+"/vidjil/"
if (config.cgi_address == "default") CGI_ADDRESS = "http://"+window.location.hostname+"/cgi/"
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", DB_ADDRESS + "static/js/checkSSL.js")
document.getElementsByTagName("head")[0].appendChild(fileref)
}
if (config.demo && config.demo.file.length != 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment