diff --git a/group_vars/all b/group_vars/all index 28a525e..cc40e2b 100644 --- a/group_vars/all +++ b/group_vars/all @@ -100,6 +100,9 @@ gitea_disable_registration: 'false' # Enable email notifications in Gitea (“true” or “false”, as a character string). gitea_enable_notify_email: 'true' +# Space-separated list of mime types to accept for attachments (“*/*” means: “anything”). +gitea_mime_attach: 'image/jpeg image/png application/zip application/gzip' + # Maximum size of HTTP and PHP uploads. http_max_upload: 10000M diff --git a/roles/ihmgit_back/tasks/main.yml b/roles/ihmgit_back/tasks/main.yml index e95b788..9fc22a6 100644 --- a/roles/ihmgit_back/tasks/main.yml +++ b/roles/ihmgit_back/tasks/main.yml @@ -98,6 +98,7 @@ - {s: mailer, o: USE_SENDMAIL, v: 'true'} - {s: session, o: PROVIDER, v: file} - {s: session, o: COOKIE_SECURE, v: 'true'} + - {s: attachment, o: ALLOWED_TYPES, v: '{{gitea_mime_attach | replace(" ", "|")}}'} - {s: log, o: MODE, v: console} - {s: log, o: LEVEL, v: Warn} - {s: log.console, o: LEVEL, v: Warn}