change the examples files
This commit is contained in:
parent
0181bd34ae
commit
ac3d318fc9
|
@ -18,12 +18,6 @@ from ereuse_devicehub.modules.dpp.views import dpp
|
||||||
from ereuse_devicehub.modules.oidc.views import oidc
|
from ereuse_devicehub.modules.oidc.views import oidc
|
||||||
from ereuse_devicehub.modules.oidc.oauth2 import config_oauth
|
from ereuse_devicehub.modules.oidc.oauth2 import config_oauth
|
||||||
|
|
||||||
# from flask_wtf.csrf import CSRFProtect
|
|
||||||
|
|
||||||
|
|
||||||
# from werkzeug.middleware.profiler import ProfilerMiddleware
|
|
||||||
|
|
||||||
|
|
||||||
app = Devicehub(inventory=DevicehubConfig.DB_SCHEMA)
|
app = Devicehub(inventory=DevicehubConfig.DB_SCHEMA)
|
||||||
app.register_blueprint(core)
|
app.register_blueprint(core)
|
||||||
app.register_blueprint(devices)
|
app.register_blueprint(devices)
|
||||||
|
@ -37,13 +31,3 @@ app.register_blueprint(oidc)
|
||||||
|
|
||||||
config_oauth(app)
|
config_oauth(app)
|
||||||
|
|
||||||
# configure & enable CSRF of Flask-WTF
|
|
||||||
# NOTE: enable by blueprint to exclude API views
|
|
||||||
# TODO(@slamora: enable by default & exclude API views when decouple of Teal is completed
|
|
||||||
# csrf = CSRFProtect(app)
|
|
||||||
# csrf.protect(core)
|
|
||||||
# csrf.protect(devices)
|
|
||||||
# app.config["SQLALCHEMY_RECORD_QUERIES"] = True
|
|
||||||
# app.config['PROFILE'] = True
|
|
||||||
# app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30])
|
|
||||||
# app.run(debug=True)
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
API_DLT='http://$IP_API_DLT'
|
API_DLT='http://$IP_API_DLT'
|
||||||
API_DLT_TOKEN=$TOKEN
|
API_DLT_TOKEN=$TOKEN
|
||||||
API_RESOLVER='http://$IP_API_RESOLVER'
|
API_RESOLVER='http://$IP_API_RESOLVER'
|
||||||
|
# you might change or register ID_FEDERATED if you change DEVICEHUB_HOST
|
||||||
ID_FEDERATED='DH12'
|
ID_FEDERATED='DH12'
|
||||||
|
|
||||||
# Database Variables
|
# Database Variables
|
||||||
|
@ -15,7 +16,6 @@ DB_SCHEMA='dbtest'
|
||||||
# TODO this should be guessed by DEVICEHUB_HOST, and avoid hardcode of ID_FEDERATED
|
# TODO this should be guessed by DEVICEHUB_HOST, and avoid hardcode of ID_FEDERATED
|
||||||
SERVER_ID_FEDERATED='DH12'
|
SERVER_ID_FEDERATED='DH12'
|
||||||
CLIENT_ID_FEDERATED='DH20'
|
CLIENT_ID_FEDERATED='DH20'
|
||||||
URL_MANUALS='http://localhost:4000'
|
|
||||||
|
|
||||||
#SERVER_ID_DEVICEHUB_HOST='http://devicehub-server-id.example.com'
|
#SERVER_ID_DEVICEHUB_HOST='http://devicehub-server-id.example.com'
|
||||||
SERVER_ID_DEVICEHUB_HOST='http://localhost:5000'
|
SERVER_ID_DEVICEHUB_HOST='http://localhost:5000'
|
||||||
|
@ -36,3 +36,6 @@ SECRET_KEY='aaaa'
|
||||||
#SNAPSHOTS_PATH='./relpath/to/snapshots'
|
#SNAPSHOTS_PATH='./relpath/to/snapshots'
|
||||||
# full path starts with /
|
# full path starts with /
|
||||||
SNAPSHOTS_PATH='/tmp/dhub_docker/snapshots'
|
SNAPSHOTS_PATH='/tmp/dhub_docker/snapshots'
|
||||||
|
|
||||||
|
# If you have a URL_MANUALS implementation, please change this url
|
||||||
|
URL_MANUALS='http://localhost:4000'
|
||||||
|
|
Reference in New Issue