-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix static location in index when prefix is used
When the prefix is used (e.g. not /), the links generated in the index page are wrong. In this patch the relative path is correctly calculated by the pathlib module and a absolute url is used as link in the index page. The original bug can be demonstrated with following example: --- import pathlib from aiohttp import web app = web.Application() app.router.add_static('/static', pathlib.Path(__file__).parent, show_index=True) web.run_app(app) ---
- Loading branch information
1 parent
e1c682c
commit 518bcbb
Showing
3 changed files
with
18 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters