mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-30 13:36:45 +00:00
Allow setting boot, wiki, and pathPrefix for each request (#4649)
* Add pathPrefix to state, and options to request handler * use ternary operator instead of default empty object * Fix styling issues * Update server.js * Add boot to server and filesystem adapter
This commit is contained in:
@@ -31,7 +31,7 @@ BasicAuthenticator.prototype.init = function() {
|
||||
// Read the credentials data
|
||||
this.credentialsFilepath = this.server.get("credentials");
|
||||
if(this.credentialsFilepath) {
|
||||
var resolveCredentialsFilepath = path.resolve($tw.boot.wikiPath,this.credentialsFilepath);
|
||||
var resolveCredentialsFilepath = path.resolve(this.server.boot.wikiPath,this.credentialsFilepath);
|
||||
if(fs.existsSync(resolveCredentialsFilepath) && !fs.statSync(resolveCredentialsFilepath).isDirectory()) {
|
||||
var credentialsText = fs.readFileSync(resolveCredentialsFilepath,"utf8"),
|
||||
credentialsData = $tw.utils.parseCsvStringWithHeader(credentialsText);
|
||||
|
||||
Reference in New Issue
Block a user