From 26d69f6ff7ec219e9b236708eb33cf085eb28489 Mon Sep 17 00:00:00 2001 From: Stephen Dade Date: Sun, 8 Dec 2024 11:11:38 +1100 Subject: [PATCH] Server: rearrange requires for crypto --- server/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/index.js b/server/index.js index 703e215d..9a376a1a 100644 --- a/server/index.js +++ b/server/index.js @@ -27,6 +27,10 @@ const app = express() const http = require('http').Server(app) const path = require('path') +const io = require('socket.io')(http, { cookie: false }) +const { check, validationResult } = require('express-validator') +const crypto = require('crypto'); + // set up rate limiter: maximum of fifty requests per minute const RateLimit = require('express-rate-limit') const limiter = RateLimit({ @@ -47,10 +51,6 @@ app.use(limiter) // use file uploader for Wireguard profiles app.use(fileUpload({ limits: { fileSize: 500 }, abortOnLimit: true, useTempFiles: true, tempFileDir: '/tmp/', safeFileNames: true, preserveExtension: 4 })) -const io = require('socket.io')(http, { cookie: false }) -const { check, validationResult } = require('express-validator') -const crypto = require('crypto'); - // Init settings before running the other classes settings.init({ appName: 'Rpanion-server', // required,