Skip to content

best way to save what you love

repo: merge new commits from main into develop

wukko2a42ed38b6e6
diff --cc api/src/core/api.js
index 32bd23ce,fdd13ce1..78d4359e
--- a/api/src/core/api.js
+++ b/api/src/core/api.js
@@@ -106,8 -105,20 +106,18 @@@ export const runAPI = (express, app, __
app.post('/', apiLimiter);
app.use('/tunnel', apiLimiterStream);
+ app.post('/', (req, res, next) => {
+ if (!acceptRegex.test(req.header('Accept'))) {
+ return fail(res, "error.api.header.accept");
+ }
-
+ if (!acceptRegex.test(req.header('Content-Type'))) {
+ return fail(res, "error.api.header.content_type");
+ }
-
+ next();
+ });
+
app.post('/', (req, res, next) => {
- if (!env.turnstileSecret || !env.jwtSecret) {
+ if (!env.sessionEnabled) {
return next();
}