diff --git a/compose.yaml b/compose.yaml index 80f8112..b16b071 100644 --- a/compose.yaml +++ b/compose.yaml @@ -5,7 +5,7 @@ services: context: . dockerfile: osg.dockerfile - image: osg:28 # <--automate this number change to trigger stack redeploy. + image: osg:29 # <--automate this number change to trigger stack redeploy. environment: DOCKER: "true" diff --git a/server.py b/server.py index 195f469..d6f92df 100644 --- a/server.py +++ b/server.py @@ -50,11 +50,7 @@ def run_server(host_ip, host_port, host_prefix, static_dir, database_connection, '/': { 'tools.staticdir.on': True, 'tools.staticdir.dir': static_dir, - 'tools.staticdir.index': 'index.html', - 'tools.expires.on': True, - 'tools.expires.secs': 30*24*60*60, # 30 days - 'tools.gzip.on': True, - 'tools.gzip.mime_types': ['text/*', 'application/*', 'font/*'], + 'tools.staticdir.index': 'index.html', }, '/images': { 'tools.caching.on': True, @@ -69,8 +65,11 @@ def run_server(host_ip, host_port, host_prefix, static_dir, database_connection, 'server.socket_timeout': 10, 'response.timeout': 30, 'tools.gzip.on': True, - 'tools.gzip.mime_types': ['text/*', 'application/*'], - 'tools.encode.text_only': False + 'tools.gzip.mime_types': ['text/*', 'application/*', 'font/*'], + 'tools.encode.on': True, + 'tools.encode.encoding': 'utf-8', + 'tools.encode.text_only': False, + 'cherrypy.response.headers': {'Cache-Control': f'max-age={30*24*60*60}'}, # 30 days } if production: