Add content disposition
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.

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

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')