fixed static file serving via starlet

This commit is contained in:
Jenny Danzmayr 2023-12-08 00:15:55 +01:00
parent 295334a4a3
commit d7a22bf715

View file

@ -33,7 +33,11 @@ with suppress(ImportError):
static_app = ProtocolTypeRouter({
"http": Starlette(routes=[
Mount(settings.STATIC_URL, app=StaticFiles(directory=settings.STATIC_ROOT), name='static'),
Mount('/', app=django_asgi),
Mount(
path=settings.STATIC_URL,
app=StaticFiles(directory=settings.STATIC_ROOT, follow_symlink=True),
name='static',
),
Mount(path='/',app=django_asgi),
]),
})