mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-04-21 04:41:06 -07: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:
parent
2c24f30cdd
commit
d32fb6f900
4 changed files with 21 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue