mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-13 02:14:32 +01:00
Merge pull request #55 from ajayyy/experimental
Added WAL mode checkpoint number
This commit is contained in:
commit
97a2aa5015
1 changed files with 6 additions and 0 deletions
6
index.js
6
index.js
|
@ -39,6 +39,12 @@ var adminUserID = config.adminUserID;
|
||||||
//if so, it will use the x-forwarded header instead of the ip address of the connection
|
//if so, it will use the x-forwarded header instead of the ip address of the connection
|
||||||
var behindProxy = config.behindProxy;
|
var behindProxy = config.behindProxy;
|
||||||
|
|
||||||
|
// Enable WAL mode checkpoint number
|
||||||
|
if (!config.readOnly && config.mode === "production") {
|
||||||
|
db.get("PRAGMA journal_mode=WAL;");
|
||||||
|
db.get("PRAGMA wal_autocheckpoint=1;");
|
||||||
|
}
|
||||||
|
|
||||||
//setup CORS correctly
|
//setup CORS correctly
|
||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
res.header("Access-Control-Allow-Origin", "*");
|
res.header("Access-Control-Allow-Origin", "*");
|
||||||
|
|
Loading…
Reference in a new issue