mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02:00

* Fix scanning of the uploaded images folder on startup * Re-write tests to pass linting * Disable image output gzip scan by default * Add `ENABLE_IMAGE_OUTPUT_GZIP_SCAN` to `.env.example`
11 lines
378 B
JavaScript
11 lines
378 B
JavaScript
const express = require('express');
|
|
const staticCache = require('../utils/staticCache');
|
|
const paths = require('~/config/paths');
|
|
const { isEnabled } = require('~/server/utils');
|
|
|
|
const skipGzipScan = !isEnabled(process.env.ENABLE_IMAGE_OUTPUT_GZIP_SCAN);
|
|
|
|
const router = express.Router();
|
|
router.use(staticCache(paths.imageOutput, { skipGzipScan }));
|
|
|
|
module.exports = router;
|