forked from abramhindle/CMPUT404-project-socialdistribution
-
Notifications
You must be signed in to change notification settings - Fork 2
Server Admin Node Management
Jawad Hossain edited this page Nov 23, 2021
·
8 revisions
To add a remote node login to the admin panel at /admin and then create a new node object. Example node:
Host = example.com
Api_prefix = /api
Username: team99
Password: secret
Remote credentials = False
Set Remote credentials = False
if the credentials will be used by example.com
to connect with this server and set Remote credentials = True
if the credentials will be used to connect to exmaple.com. Api_prefix
is optional.
Next, add this host to the list called "CORS_ALLOWED_ORIGINS" in code/cmput404/settings.py. Like:
CORS_ALLOWED_ORIGINS = [
"http://example.com",
"https://google.com",
....
]
- For this server's credentials both
Remote credentials = True/False
need to be present and same. ie:
Host = social-distribution-fall2021.herokuapp.com
Api_prefix = /api
Username: team99
Password: secret99
Remote credentials = True/False
-
The
host
issocial-distribution-fall2021.herokuapp.com
for production and127.0.0.1:8000
in development for example. -
Each remote server can have two nodes at maximum with a different set of usernames/passwords.