|
|
@ -12,8 +12,8 @@ const { host, port, useSsl, diskFilePath, isProxied } = require('./config.json')
|
|
|
|
//#region Imports
|
|
|
|
//#region Imports
|
|
|
|
const fs = require('fs-extra');
|
|
|
|
const fs = require('fs-extra');
|
|
|
|
const express = require('express');
|
|
|
|
const express = require('express');
|
|
|
|
const helmet = require("helmet");
|
|
|
|
const helmet = require('helmet');
|
|
|
|
const rateLimit = require("express-rate-limit");
|
|
|
|
const rateLimit = require('express-rate-limit');
|
|
|
|
const uploadRouter = require('./routers/upload');
|
|
|
|
const uploadRouter = require('./routers/upload');
|
|
|
|
const resourceRouter = require('./routers/resource');
|
|
|
|
const resourceRouter = require('./routers/resource');
|
|
|
|
const { path, log, generateToken } = require('./utils');
|
|
|
|
const { path, log, generateToken } = require('./utils');
|
|
|
@ -65,7 +65,7 @@ function preStartup() {
|
|
|
|
function startup() {
|
|
|
|
function startup() {
|
|
|
|
// Enable/disable Express features
|
|
|
|
// Enable/disable Express features
|
|
|
|
app.enable('case sensitive routing');
|
|
|
|
app.enable('case sensitive routing');
|
|
|
|
app.disable("x-powered-by");
|
|
|
|
app.disable('x-powered-by');
|
|
|
|
|
|
|
|
|
|
|
|
// Set Express variables
|
|
|
|
// Set Express variables
|
|
|
|
app.set('trust proxy', isProxied);
|
|
|
|
app.set('trust proxy', isProxied);
|
|
|
|