Merge branch 'wukko:current' into add-language-selector

This commit is contained in:
Blobadoodle 2023-04-08 16:36:23 +01:00 committed by GitHub
commit 83582ebd44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{
"name": "cobalt",
"description": "save what you love",
"version": "5.3",
"version": "5.3.1",
"author": "wukko",
"exports": "./src/cobalt.js",
"type": "module",
@ -26,7 +26,7 @@
"cors": "^2.8.5",
"dotenv": "^16.0.1",
"esbuild": "^0.14.51",
"express": "^4.17.1",
"express": "^4.18.1",
"express-rate-limit": "^6.3.0",
"ffmpeg-static": "^5.1.0",
"got": "^12.1.0",

View File

@ -26,8 +26,9 @@ const commitHash = shortCommit();
const branch = getCurrentBranch();
const app = express();
const corsConfig = process.env.cors === '0' ? { origin: process.env.selfURL, optionsSuccessStatus: 200 } : {};
app.disable('x-powered-by');
app.use('/api/:type', cors())
if (fs.existsSync('./.env') && process.env.selfURL && process.env.streamSalt && process.env.port) {
const apiLimiter = rateLimit({
@ -55,6 +56,7 @@ if (fs.existsSync('./.env') && process.env.selfURL && process.env.streamSalt &&
await buildFront(commitHash, branch);
app.use('/api/:type', cors(corsConfig));
app.use('/api/json', apiLimiter);
app.use('/api/stream', apiLimiterStream);
app.use('/api/onDemand', apiLimiter);

View File

@ -147,9 +147,9 @@ button:active,
background: var(--accent-press);
cursor: pointer;
}
.desktop .switch.text-backdrop:hover,
.switch.text-backdrop:hover,
.switch.text-backdrop:active,
.desktop .text-to-copy.text-backdrop:hover,
.text-to-copy.text-backdrop:hover,
.text-to-copy.text-backdrop:active {
background: var(--accent);
color: var(--background);