mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-09 18:08:00 +00:00
fix dev mode
This commit is contained in:
parent
5dcf375247
commit
d44498b966
|
@ -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:
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue