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
const fs = require('fs-extra');
const express = require('express');
const helmet = require("helmet");
const rateLimit = require("express-rate-limit");
const helmet = require('helmet');
const rateLimit = require('express-rate-limit');
const uploadRouter = require('./routers/upload');
const resourceRouter = require('./routers/resource');
const { path, log, generateToken } = require('./utils');
@ -65,7 +65,7 @@ function preStartup() {
function startup() {
// Enable/disable Express features
app.enable('case sensitive routing');
app.disable("x-powered-by");
app.disable('x-powered-by');
// Set Express variables
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
router.post('/', (req, res) => {
// Load overrides
const trueDomain = getTrueDomain(req.headers["x-ass-domain"]);
const generator = req.headers["x-ass-access"] || resourceIdType;
const trueDomain = getTrueDomain(req.headers['x-ass-domain']);
const generator = req.headers['x-ass-access'] || resourceIdType;
// Get the uploaded time in milliseconds
req.file.timestamp = DateTime.now().toMillis();

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

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

Loading…
Cancel
Save