Add content disposition
buildbot/multibuild_parent Build done. Details
buildbot/travis_bionic Build done. Details

This commit is contained in:
Peter Šurda 2024-04-15 17:33:03 +08:00
parent 01736ba0fa
commit 74b6d0ee83
Signed by: PeterSurda
GPG Key ID: 3E47497CF67ABB95
1 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,8 @@ class Root:
'Basic realm="ICS access"'
cherrypy.response.headers['Content-Type'] = \
'text/calendar'
cherrypy.response.headers['Content-Disposition'] = \
'attachment; filename="Gitea TODO.ics"'
authorization = cherrypy.request.headers.get('Authorization', ':')
if not authorization:
raise cherrypy.HTTPError(401, 'Unauthorized')