added some more readmes
This commit is contained in:
parent
636cf3a8d1
commit
76356d5e3f
6 changed files with 37 additions and 8 deletions
9
onionr/apiservers/README.md
Normal file
9
onionr/apiservers/README.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# API Servers
|
||||
|
||||
Contains the WSGI servers Onionr uses for remote peer communication and local daemon control
|
||||
|
||||
## Files
|
||||
|
||||
* \_\_init\_\_.py: Exposes the server classes
|
||||
* private: Contains the client API (the server used to interact with the local Onionr daemon, and view the web UI)
|
||||
* public: Contains the public API (the server used by remote peers to talk to our daemon)
|
||||
8
onionr/apiservers/private/README.md
Normal file
8
onionr/apiservers/private/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Private API Server
|
||||
|
||||
Private API server, used to access the web interface locally and control Onionr
|
||||
|
||||
## Files
|
||||
|
||||
* \_\_init\_\_.py: Sets up the server and a few misc functions
|
||||
* register_private_blueprints.py: Adds in flask blueprints for various sub-APIs
|
||||
|
|
@ -72,7 +72,7 @@ class PrivateAPI:
|
|||
'''
|
||||
Validate that the client token matches the given token. Used to prevent CSRF and data exfiltration
|
||||
'''
|
||||
if len(self.clientToken) == 0:
|
||||
if not self.clientToken:
|
||||
logger.error("client password needs to be set")
|
||||
return False
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue