mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 10:34:17 +00:00
"
This commit is contained in:
parent
06061048e0
commit
b515eb24f9
@ -12,7 +12,7 @@ const serverManifest = {
|
|||||||
get: (key) => {
|
get: (key) => {
|
||||||
let data = {}
|
let data = {}
|
||||||
if (fs.existsSync(SERVER_MANIFEST)) {
|
if (fs.existsSync(SERVER_MANIFEST)) {
|
||||||
data = JSON.parse(fs.readFileSync(SERVER_MANIFEST_PATH, 'utf8'))
|
data = JSON.parse(fs.readFileSync(SERVER_MANIFEST_PATH, "utf8"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof key === "string") {
|
if (typeof key === "string") {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const path = require('path')
|
const path = require("path")
|
||||||
const fs = require('fs')
|
const fs = require("fs")
|
||||||
|
|
||||||
// TODO: Volatile files
|
// TODO: Volatile files
|
||||||
// TODO: Redis cache
|
// TODO: Redis cache
|
||||||
@ -7,10 +7,10 @@ const fs = require('fs')
|
|||||||
class FilesystemDriver {
|
class FilesystemDriver {
|
||||||
constructor(params) {
|
constructor(params) {
|
||||||
this.params = { ...params }
|
this.params = { ...params }
|
||||||
this.rootPath = this.params.root ?? path.resolve(process.cwd(), 'storage')
|
this.rootPath = this.params.root ?? path.resolve(process.cwd(), "storage")
|
||||||
|
|
||||||
this.defaultWriteMode = "0777"
|
this.defaultWriteMode = "0777"
|
||||||
this.defaultWriteFlags = 'w+'
|
this.defaultWriteFlags = "w+"
|
||||||
|
|
||||||
this.strictMimetypeCheck = this.strictMimetypeCheck ?? false
|
this.strictMimetypeCheck = this.strictMimetypeCheck ?? false
|
||||||
this.checkMimetypes = this.params.checkMimetypes ?? false
|
this.checkMimetypes = this.params.checkMimetypes ?? false
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
const path = require('path')
|
const path = require("path")
|
||||||
const fs = require('fs')
|
const fs = require("fs")
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const path = require('path')
|
const path = require("path")
|
||||||
|
|
||||||
const drivers = {
|
const drivers = {
|
||||||
"fs": require("./drivers/filesystem"),
|
"fs": require("./drivers/filesystem"),
|
||||||
|
@ -25,7 +25,7 @@ global.DEFAULT_SERVER_PARAMS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
global.DEFAULT_MIDDLEWARES = [
|
global.DEFAULT_MIDDLEWARES = [
|
||||||
require('cors')({
|
require("cors")({
|
||||||
"origin": "*",
|
"origin": "*",
|
||||||
"methods": DEFAULT_HEADERS["Access-Control-Allow-Methods"],
|
"methods": DEFAULT_HEADERS["Access-Control-Allow-Methods"],
|
||||||
"preflightContinue": false,
|
"preflightContinue": false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user