-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Is your feature request related to a problem? Please describe.
I use uv with symlinks to manage my python environments on an hpc cluster, links are useful for us since we have multiple mounted drives. After a lot of testing I found that the symlink venv structure was the reason my trame apps almost always gave a 404 error. If I installed with the default hardlinks the app worked fine.
Describe the solution you'd like
Ideally, since aiohttp already has an option to turn on symlinks, "follow_symlinks = True", exposing it as a server.start kwarg makes sense to me.
Describe alternatives you've considered
The following monkey patch is my current solution.
# Patch aiohttp to follow symlinks
import aiohttp.web
original_static = aiohttp.web.static
def patched_static(prefix, path, **kwargs):
kwargs['follow_symlinks'] = True
print(f"Registering static route with symlink support: {prefix} -> {path}")
return original_static(prefix, path, **kwargs)
aiohttp.web.static = patched_static
server.start()Additional context
N/A
Metadata
Metadata
Assignees
Labels
No labels