forked from nat/sludge
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9e4c8ba3df | ||
![]() |
9669e09448 |
@ -90,13 +90,21 @@ routes = [
|
|||||||
)][-1]
|
)][-1]
|
||||||
),
|
),
|
||||||
Route(
|
Route(
|
||||||
lambda path: os.path.isfile('.' + path.path) and (path.path.startswith('/font/') or path.path.startswith('/files/')),
|
lambda path: os.path.isfile('.' + path.path) and (path.path.startswith('/font/') or path.path.startswith('/files/') or path.path.startswith('/.well-known/')),
|
||||||
[Method.GET],
|
[Method.GET],
|
||||||
lambda request, *_: Response(
|
lambda request, *_: Response(
|
||||||
ResponseCode.OK,
|
ResponseCode.OK,
|
||||||
*raw_file_contents('.' + request.path.path)
|
*raw_file_contents('.' + request.path.path)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
Route(
|
||||||
|
lambda request: request.path == '/robots.txt',
|
||||||
|
[Method.GET],
|
||||||
|
lambda *_: Response(
|
||||||
|
ResponseCode.OK,
|
||||||
|
*raw_file_contents('./robots.txt')
|
||||||
|
)
|
||||||
|
),
|
||||||
Route(
|
Route(
|
||||||
lambda request: request.path == '/status',
|
lambda request: request.path == '/status',
|
||||||
[Method.GET],
|
[Method.GET],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user