Add cookie notice with settings, jfif preview support, and share page title from link name
This commit is contained in:
@@ -872,7 +872,7 @@ app.get('/api/settings', requireAdmin, async (_, res) => {
|
||||
|
||||
app.get('/api/public-settings', apiLimiter, async (_, res) => {
|
||||
const out = await cacheWrap('public-settings', PUBLIC_TTL_MS, async () => {
|
||||
const keys = ['footer_left', 'footer_right', 'share_show_student_message', 'share_show_entry_date', 'share_show_student_names', 'share_show_group_photos'];
|
||||
const keys = ['footer_left', 'footer_right', 'share_show_student_message', 'share_show_entry_date', 'share_show_student_names', 'share_show_group_photos', 'cookie_notice_text'];
|
||||
const result = {};
|
||||
for (const k of keys) result[k] = await getSetting(k, '');
|
||||
return result;
|
||||
@@ -2308,7 +2308,7 @@ app.post('/api/entries/:id/files', requireAuth, (req, res, next) => {
|
||||
});
|
||||
|
||||
function isImageName(name) {
|
||||
return /\.(jpe?g|png|gif|webp|bmp|avif|ico)$/i.test(name || '');
|
||||
return /\.(jpe?g|jfif|png|gif|webp|bmp|avif|ico)$/i.test(name || '');
|
||||
}
|
||||
|
||||
app.get('/api/files', requireAuth, async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user