From d44498b966c1edac2ba54ec3db2c1c3b36be647d Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Mon, 4 Mar 2024 01:09:40 -0500 Subject: [PATCH] fix dev mode --- relay/application.py | 2 +- relay/manage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/application.py b/relay/application.py index c834598..ea65992 100644 --- a/relay/application.py +++ b/relay/application.py @@ -262,7 +262,7 @@ async def handle_response_headers(request: web.Request, handler: Coroutine) -> R resp = await handler(request) resp.headers['Server'] = 'ActivityRelay' - if request.app['dev'] and request.path.endswith(('.css', '.js')): + if not request.app['dev'] and request.path.endswith(('.css', '.js')): resp.headers['Cache-Control'] = 'public,max-age=2628000,immutable' else: diff --git a/relay/manage.py b/relay/manage.py index 63fc6db..796ec0b 100644 --- a/relay/manage.py +++ b/relay/manage.py @@ -217,7 +217,7 @@ def cli_run(ctx: click.Context, dev: bool = False) -> None: click.echo(pip_command) return - ctx.obj['dev'] = True + ctx.obj['dev'] = dev ctx.obj.run() # todo: figure out why the relay doesn't quit properly without this