replaced " with '

pull/22/head
tycrek 3 years ago
parent b7368fbd16
commit abc57471fa
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -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);

@ -35,8 +35,8 @@ router.use('/', (err, _req, res, next) => err.code && err.code === 'LIMIT_FILE_S
// Process uploaded file // Process uploaded file
router.post('/', (req, res) => { router.post('/', (req, res) => {
// Load overrides // Load overrides
const trueDomain = getTrueDomain(req.headers["x-ass-domain"]); const trueDomain = getTrueDomain(req.headers['x-ass-domain']);
const generator = req.headers["x-ass-access"] || resourceIdType; const generator = req.headers['x-ass-access'] || resourceIdType;
// Get the uploaded time in milliseconds // Get the uploaded time in milliseconds
req.file.timestamp = DateTime.now().toMillis(); req.file.timestamp = DateTime.now().toMillis();

@ -9,7 +9,7 @@ const config = {
resourceIdSize: 12, resourceIdSize: 12,
gfyIdSize: 2, gfyIdSize: 2,
resourceIdType: 'zws', resourceIdType: 'zws',
diskFilePath: "uploads/", diskFilePath: 'uploads/',
saveWithDate: false, saveWithDate: false,
saveAsOriginal: true, saveAsOriginal: true,
s3enabled: false, s3enabled: false,

@ -33,7 +33,7 @@ function getDirectUrl(resourceId) {
} }
function randomHexColour() { // From: https://www.geeksforgeeks.org/javascript-generate-random-hex-codes-color/ function randomHexColour() { // From: https://www.geeksforgeeks.org/javascript-generate-random-hex-codes-color/
const letters = "0123456789ABCDEF"; const letters = '0123456789ABCDEF';
let colour = '#'; let colour = '#';
for (let i = 0; i < 6; i++) // skipcq: JS-0074 for (let i = 0; i < 6; i++) // skipcq: JS-0074
colour += letters[(Math.floor(Math.random() * letters.length))]; colour += letters[(Math.floor(Math.random() * letters.length))];

Loading…
Cancel
Save