mirror of https://gitgud.io/fatchan/jschan.git
parent
5dbbe8d57d
commit
9ce66a303d
37 changed files with 193 additions and 167 deletions
@ -0,0 +1,159 @@ |
||||
module.exports = { |
||||
|
||||
//mongodb connection string |
||||
dbURL: 'mongodb://username:password@localhost:27017', |
||||
|
||||
//redis connection info |
||||
redis: { |
||||
host: '127.0.0.1', |
||||
port: '6379', |
||||
password: 'long random string' |
||||
}, |
||||
|
||||
//backend webserver port |
||||
port: 7000, |
||||
|
||||
//secrets/salts for various things |
||||
sessionSecret: 'long random string', |
||||
tripcodeSecret: 'long random string', |
||||
ipHashSecret: 'long random string', |
||||
postPasswordSecret: 'long random string', |
||||
|
||||
//enable secure cookies, only use with https |
||||
secureCookies: true, |
||||
|
||||
//check referrer to prevent some CSRF attack |
||||
refererCheck: true, |
||||
refererRegex: '^https?:\\/\\/(?:www\\.)?domain\\.com\\/', |
||||
|
||||
//data used in opengraph meta tags |
||||
meta: { |
||||
siteName: 'imageboard', |
||||
url: 'https://domain.com' |
||||
}, |
||||
|
||||
//cache templates in memory |
||||
cacheTemplates: true, |
||||
|
||||
//prune modlogs older than 30 days. pruning occurs when new modlog entries are generated |
||||
pruneModlogs: true, |
||||
|
||||
//let all users create new boards |
||||
enableUserBoards: true, |
||||
|
||||
//extension for thumbnails. png is larger but allows transparency |
||||
thumbExtension: '.png', |
||||
|
||||
//max thumb dimensions |
||||
thumbSize: 200, |
||||
|
||||
//default ban duration in ms if ban duration field is left blank |
||||
defaultBanDuration: 31536000000, |
||||
|
||||
//max number of quotes that will be linked in a post. 0 for unlimited |
||||
quoteLimit: 15, |
||||
|
||||
//options for code block highlighting in posts |
||||
highlightOptions: { |
||||
|
||||
//subset of languages to allow |
||||
languageSubset: [ |
||||
'javascript', |
||||
'js', |
||||
'typescript', |
||||
'java', |
||||
'kotlin', |
||||
'php', |
||||
'c++', |
||||
'c', |
||||
'h', |
||||
'csharp', |
||||
'bash', |
||||
'sh', |
||||
'zsh', |
||||
'python', |
||||
'ruby', |
||||
'css', |
||||
'html', |
||||
'json', |
||||
'golang', |
||||
'rust' |
||||
], |
||||
|
||||
//threshold below which auto language is ignored |
||||
threshold: 5 |
||||
|
||||
}, |
||||
|
||||
//global limits for board settings |
||||
globalLimits: { |
||||
threadLimit: { |
||||
min: 10, |
||||
max: 200 |
||||
}, |
||||
replyLimit: { |
||||
min: 10, |
||||
max: 500 |
||||
}, |
||||
postFiles: { |
||||
max: 3 |
||||
}, |
||||
postFilesSize: { |
||||
max: 10485760 |
||||
}, |
||||
bannerFiles: { |
||||
max: 10 |
||||
}, |
||||
bannerFilesSize: { |
||||
max: 10485760 |
||||
}, |
||||
messageLength: { |
||||
max: 4000 |
||||
} |
||||
}, |
||||
|
||||
//default board settings when a board is created |
||||
boardDefaults: { |
||||
theme: 'lain', |
||||
codeTheme: 'ir-black', |
||||
sfw: false, |
||||
locked: false, |
||||
unlisted: false, |
||||
captchaMode: 0, |
||||
tphTrigger: 0, |
||||
pphTrigger: 0, |
||||
triggerAction: 0, |
||||
forceAnon: false, |
||||
early404: true, |
||||
ids: false, |
||||
flags: false, |
||||
userPostDelete: true, |
||||
userPostSpoiler: true, |
||||
userPostUnlink: true, |
||||
threadLimit: 200, |
||||
replyLimit: 500, |
||||
maxFiles: 1, |
||||
forceReplyMessage: false, |
||||
forceReplyFile: false, |
||||
forceThreadMessage: false, |
||||
forceThreadFile: false, |
||||
forceThreadSubject: false, |
||||
minThreadMessageLength: 0, |
||||
minReplyMessageLength: 0, |
||||
defaultName: 'Anon', |
||||
filters: [], |
||||
filterMode: 0, |
||||
filterBanDuration: 0, |
||||
announcement: { |
||||
raw: null, |
||||
markdown: null |
||||
}, |
||||
allowedFileTypes: { |
||||
animatedImage: true, |
||||
image: true, |
||||
video: true, |
||||
audio: true |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,119 +0,0 @@ |
||||
{ |
||||
"dbURL": "mongodb://username:password@localhost:27017", |
||||
"redis": { |
||||
"host": "127.0.0.1", |
||||
"port": "6379", |
||||
"password": "long random string" |
||||
}, |
||||
"port": 7000, |
||||
"sessionSecret": "long random string", |
||||
"tripcodeSecret": "long random string", |
||||
"ipHashSecret": "long random string", |
||||
"postPasswordSecret": "long random string", |
||||
"secureCookies": true, |
||||
"cacheTemplates": true, |
||||
"pruneModlogs": true, |
||||
"enableUserBoards": true, |
||||
"thumbExtension": ".png", |
||||
"thumbSize": 200, |
||||
"defaultBanDuration": 31536000000, |
||||
"quoteLimit": 15, |
||||
"highlightOptions": { |
||||
"languageSubset": [ |
||||
"javascript", |
||||
"js", |
||||
"typescript", |
||||
"java", |
||||
"kotlin", |
||||
"php", |
||||
"c++", |
||||
"c", |
||||
"h", |
||||
"csharp", |
||||
"bash", |
||||
"sh", |
||||
"zsh", |
||||
"python", |
||||
"ruby", |
||||
"css", |
||||
"html", |
||||
"json", |
||||
"golang", |
||||
"rust" |
||||
], |
||||
"threshold": 5 |
||||
}, |
||||
"refererCheck": true, |
||||
"refererRegex": "^https?:\\/\\/(?:www\\.)?domain\\.com\\/", |
||||
"meta": { |
||||
"siteName": "imageboard", |
||||
"url": "https://domain.com" |
||||
}, |
||||
"globalLimits": { |
||||
"threadLimit": { |
||||
"min": 10, |
||||
"max": 200 |
||||
}, |
||||
"replyLimit": { |
||||
"min": 10, |
||||
"max": 500 |
||||
}, |
||||
"postFiles": { |
||||
"max": 3 |
||||
}, |
||||
"postFilesSize": { |
||||
"max": 10485760 |
||||
}, |
||||
"bannerFiles": { |
||||
"max": 10 |
||||
}, |
||||
"bannerFilesSize": { |
||||
"max": 10485760 |
||||
}, |
||||
"messageLength": { |
||||
"max": 4000 |
||||
} |
||||
}, |
||||
"boardDefaults": { |
||||
"theme": "lain", |
||||
"codeTheme": "ir-black", |
||||
"sfw": false, |
||||
"locked": false, |
||||
"unlisted": false, |
||||
"captchaMode": 0, |
||||
"tphTrigger": 0, |
||||
"pphTrigger": 0, |
||||
"triggerAction": 0, |
||||
"forceAnon": false, |
||||
"early404": true, |
||||
"ids": false, |
||||
"flags": false, |
||||
"userPostDelete": true, |
||||
"userPostSpoiler": true, |
||||
"userPostUnlink": true, |
||||
"threadLimit": 200, |
||||
"replyLimit": 500, |
||||
"maxFiles": 1, |
||||
"forceReplyMessage": false, |
||||
"forceReplyFile": false, |
||||
"forceThreadMessage": false, |
||||
"forceThreadFile": false, |
||||
"forceThreadSubject": false, |
||||
"minThreadMessageLength": 0, |
||||
"minReplyMessageLength": 0, |
||||
"defaultName": "Anon", |
||||
"filters": [], |
||||
"filterMode": 0, |
||||
"filterBanDuration": 0, |
||||
"announcement": { |
||||
"raw": null, |
||||
"markdown": null |
||||
}, |
||||
"allowedFileTypes": { |
||||
"animatedImage": true, |
||||
"image": true, |
||||
"video": true, |
||||
"audio": true |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue