Skip to content

Commit

Permalink
urlprefix bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewiski committed Feb 13, 2024
1 parent f3e7105 commit b387451
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uisp-tools",
"version": "0.0.21",
"version": "0.0.22",
"description": "Tools for UISP",
"main": "server.js",
"license": "GPL-3.0-or-later",
Expand Down
6 changes: 4 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ var configFolder = objOptions.configDirectory;
var certificatesFolder = path.join(objOptions.configDirectory, 'certificates');
var caFolder = path.join(certificatesFolder, 'ca');

var urlPrefix = objOptions.urlPrefix || "uisptools/";

var urlPrefix = objOptions.urlPrefix;
console.log("urlPrefix " + urlPrefix);
var httpsServerKey = null
var httpsServerCert = null;
if(objOptions.httpsServerKey.startsWith("/") === true){
Expand Down Expand Up @@ -172,6 +172,7 @@ let logUtilHelper = new LogUtilHelper({
logRequestsName: "access"

})
logUtilHelper.log(appLogName, "app", "info", "urlPrfix:" + urlPrefix )

// var appLogger = new Logger({
// logLevels: objOptions.logLevels,
Expand Down Expand Up @@ -540,6 +541,7 @@ var handlePublicFileRequest = function (req, res) {

if (filePath === "/" && urlPrefix !== "") {
//filePath = "/index.htm";
logUtilHelper.log(appLogName, "app", "info", "redirecting to /" + urlPrefix );
res.redirect("/" + urlPrefix);
}
if (filePath === '/' + urlPrefix) {
Expand Down

0 comments on commit b387451

Please sign in to comment.