mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 03:08:30 +00:00
Merge branch 'imputnet:main' into main
This commit is contained in:
commit
1bcceb1aff
@ -105,6 +105,18 @@ export const runAPI = (express, app, __dirname) => {
|
||||
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) {
|
||||
return next();
|
||||
@ -128,14 +140,6 @@ export const runAPI = (express, app, __dirname) => {
|
||||
return fail(res, "error.api.auth.jwt.invalid");
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
req.authorized = true;
|
||||
} catch {
|
||||
return fail(res, "error.api.generic");
|
||||
|
@ -47,7 +47,7 @@ and for nerds, we have a giant list of backend changes (that we are also excited
|
||||
|
||||
this update allows us to actually innovate and develop new & exciting features. we are no longer held back by the legacy codebase. first feature of such kind is on-device remuxing. go check it out!
|
||||
|
||||
oh yeah, we now have 2.5 million monthly users. kind of insane.
|
||||
oh yeah, we now have over 2 million monthly users. kind of insane.
|
||||
|
||||
we hope you enjoy this update as much as we enjoyed making it. it was a really fun summer project for both of us.
|
||||
|
||||
|
@ -88,10 +88,10 @@
|
||||
"accessibility.motion.description": "disables animations and transitions whenever possible.",
|
||||
|
||||
"language": "language",
|
||||
"language.auto.title": "use default browser language",
|
||||
"language.auto.description": "automatically picks the best language for you. if preferred browser language isn't available, english is used instead.",
|
||||
"language.auto.title": "automatic selection",
|
||||
"language.auto.description": "cobalt will use your browser's default language if translation is available. if not, english will be used instead.",
|
||||
"language.preferred.title": "preferred language",
|
||||
"language.preferred.description": "if any text isn’t translated to the preferred language, it will fall back to english.",
|
||||
"language.preferred.description": "this language will be used when automatic selection is disabled. any text that isn't translated will be displayed in english.",
|
||||
|
||||
"privacy.analytics": "anonymous traffic analytics",
|
||||
"privacy.analytics.title": "don't contribute to analytics",
|
||||
|
Loading…
Reference in New Issue
Block a user