From f10e077896b09ec034fcbb5b8605f01705614e4b Mon Sep 17 00:00:00 2001 From: Arinerron Date: Thu, 6 Sep 2018 21:46:56 -0700 Subject: [PATCH] Make console output less verbose for api --- onionr/api.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/onionr/api.py b/onionr/api.py index 0f3bde41..a36e6001 100755 --- a/onionr/api.py +++ b/onionr/api.py @@ -59,14 +59,9 @@ class API: } for mimetype in mimetypes: - logger.debug(path + ' endswith .' + mimetype + '?') if path.endswith('.%s' % mimetype): - logger.debug('- True!') return mimetypes[mimetype] - else: - logger.debug('- no') - logger.debug('%s not in %s' % (path, mimetypes)) return 'text/plain' def __init__(self, debug): @@ -203,11 +198,11 @@ class API: time.sleep(self._privateDelayTime - elapsed) ''' - logger.debug('Serving %s' % path) - self.mimeType = API.guessMime(path) self.overrideCSP = True + logger.debug('Serving %s (mime: %s)' % (path, self.mimeType)) + return send_from_directory('static-data/www/ui/dist/', path, mimetype = API.guessMime(path)) @app.route('/client/')