work on api with debugging and headers

This commit is contained in:
Kevin Froman 2017-12-26 23:00:02 -06:00
parent b6e9e2e002
commit a2beb5971b
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
2 changed files with 28 additions and 4 deletions

View file

@ -19,13 +19,17 @@ import gui, api
class Onionr:
def __init__(self):
# Get configuration and Handle commands
self.debug = True # Whole application debugging
os.chdir(sys.path[0])
# Get configuration
self.config = configparser.ConfigParser()
if os.path.exists('data/config.ini'):
self.config.read('data/config.ini')
else:
# Generate default config
# Hostname should only be set if different from 127.x.x.x. Important for DNS rebinding attack prevention.
if debug:
randomPort = 8080