forked from aegis/pyserveX
fix in routing
This commit is contained in:
@@ -123,6 +123,10 @@ class RequestHandler:
|
||||
file_path = root / index_file
|
||||
else:
|
||||
file_path = root / path
|
||||
# If path is a directory, look for index file
|
||||
if file_path.is_dir():
|
||||
index_file = config.get("index_file", "index.html")
|
||||
file_path = file_path / index_file
|
||||
|
||||
try:
|
||||
file_path = file_path.resolve()
|
||||
|
||||
Reference in New Issue
Block a user