[tor-commits] [oonib/master] Add static file handler for decks and inputs
art at torproject.org
art at torproject.org
Wed Sep 11 09:13:51 UTC 2013
commit 01a69dc3669b8fc9c42688d048466b96c1d5ccc2
Author: aagbsn <aagbsn at extc.org>
Date: Mon Jul 1 16:23:51 2013 +0200
Add static file handler for decks and inputs
---
oonib.conf.example | 2 ++
oonib/report/api.py | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/oonib.conf.example b/oonib.conf.example
index b6924f1..1b51621 100644
--- a/oonib.conf.example
+++ b/oonib.conf.example
@@ -1,6 +1,8 @@
main:
report_dir: Null
archive_dir: Null
+ input_dir: Null
+ deck_dir: Null
logfile: Null
tor_datadir: Null
database_uri: 'sqlite://oonib_test_db.db'
diff --git a/oonib/report/api.py b/oonib/report/api.py
index 7747a1e..c250e71 100644
--- a/oonib/report/api.py
+++ b/oonib/report/api.py
@@ -48,7 +48,9 @@ def parseUpdateReportRequest(request):
reportingBackendAPI = [
(r"/report/([a-zA-Z0-9_\-]+)/close", file_collector.CloseReportHandlerFile),
(r"/report", file_collector.NewReportHandlerFile),
- (r"/pcap", file_collector.PCAPReportHandler)
+ (r"/pcap", file_collector.PCAPReportHandler),
+ (r"/deck/([a-z0-9]{40})$", web.StaticFileHandler, {"path": config.deck_dir}),
+ (r"/input/([a-z0-9]{40})$", web.StaticFileHandler, {"path": config.input_dir}),
]
reportingBackend = web.Application(reportingBackendAPI, debug=True)
More information about the tor-commits
mailing list