Add config option enable_webhooks_auth

Partially Implements: blueprint event-driven-optimization-based

Change-Id: I6cdfc18661b279f0d7200f39212ecdb31e500723
This commit is contained in:
licanwei
2020-02-14 16:03:45 +08:00
parent 2591b03625
commit 4255d5b28f
3 changed files with 45 additions and 4 deletions

View File

@@ -27,6 +27,10 @@ server = {
# Pecan Application Configurations
# See https://pecan.readthedocs.org/en/latest/configuration.html#application-configuration # noqa
acl_public_routes = ['/']
if not cfg.CONF.api.get("enable_webhooks_auth"):
acl_public_routes.append('/v1/webhooks/.*')
app = {
'root': 'watcher.api.controllers.root.RootController',
'modules': ['watcher.api'],
@@ -36,10 +40,7 @@ app = {
],
'static_root': '%(confdir)s/public',
'enable_acl': True,
'acl_public_routes': [
'/',
'/v1/webhooks/.*',
],
'acl_public_routes': acl_public_routes,
}
# WSME Configurations