42 lines
783 B
JavaScript
42 lines
783 B
JavaScript
const allowedMediaTypes = [
|
|||
|
|
'image/*',
|
||
|
|
'video/*',
|
||
|
|
'audio/*',
|
||
|
|
'application/pdf',
|
||
|
|
'application/msword',
|
||
|
|
'application/vnd.openxmlformats-officedocument.*',
|
||
|
|
'text/plain',
|
||
|
|
'text/csv',
|
||
|
|
];
|
||
|
|
|
||
|
|
const deniedTypes = [
|
||
|
|
'image/svg+xml',
|
||
|
|
'application/vnd.microsoft.portable-executable',
|
||
|
|
'application/x-msdownload',
|
||
|
|
'application/x-msdos-program',
|
||
|
|
'application/x-executable',
|
||
|
|
'application/x-dosexec',
|
||
|
|
'application/x-sh',
|
||
|
|
'text/x-shellscript',
|
||
|
|
'application/x-mach-binary',
|
||
|
|
];
|
||
|
|
|
||
|
|
module.exports = () => ({
|
||
|
|
'users-permissions': {
|
||
|
|
config: {
|
||
|
|
jwtManagement: 'refresh',
|
||
|
|
sessions: {
|
||
|
|
httpOnly: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
upload: {
|
||
|
|
config: {
|
||
|
|
security: {
|
||
|
|
allowedTypes: allowedMediaTypes,
|
||
|
|
deniedTypes,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|