fix dev mode

This commit is contained in:
Izalia Mae 2024-03-04 01:09:40 -05:00
parent 5dcf375247
commit d44498b966
2 changed files with 2 additions and 2 deletions

View file

@ -262,7 +262,7 @@ async def handle_response_headers(request: web.Request, handler: Coroutine) -> R
resp = await handler(request) resp = await handler(request)
resp.headers['Server'] = 'ActivityRelay' 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' resp.headers['Cache-Control'] = 'public,max-age=2628000,immutable'
else: else:

View file

@ -217,7 +217,7 @@ def cli_run(ctx: click.Context, dev: bool = False) -> None:
click.echo(pip_command) click.echo(pip_command)
return return
ctx.obj['dev'] = True ctx.obj['dev'] = dev
ctx.obj.run() ctx.obj.run()
# todo: figure out why the relay doesn't quit properly without this # todo: figure out why the relay doesn't quit properly without this