Skip to content

Commit

Permalink
Server: rearrange requires for crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
stephendade committed Dec 8, 2024
1 parent 093b4f0 commit 26d69f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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,
Expand Down

0 comments on commit 26d69f6

Please sign in to comment.