Commit 6dace07f authored by Sofia Papagiannaki's avatar Sofia Papagiannaki

pithos: Remove obsolete settings

* PITHOS_ASTAKOS_COOKIE_NAME (not useful any more)
* PITHOS_SERVE_API (in favor of PITHOS_SERVE_API_DOMAIN)
parent a12b8a15
......@@ -4,9 +4,6 @@
# Top-level URL for the Astakos instance to be used for user management
#ASTAKOS_AUTH_URL = 'https://accounts.example.synnefo.org/identity/v2.0'
# Cookie name to search for fallback token
#PITHOS_ASTAKOS_COOKIE_NAME = '_pithos2_a'
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
#PITHOS_BACKEND_DB_MODULE = 'pithos.backends.lib.sqlalchemy'
#PITHOS_BACKEND_DB_CONNECTION = 'sqlite:////tmp/pithos-backend.db'
......@@ -62,5 +59,6 @@
# the views with astakos during the resource access token generation procedure
#PITHOS_OAUTH2_CLIENT_CREDENTIALS = (None, None)
#
# Set to False to serve only views
#SERVE_API = getattr(settings, 'PITHOS_SERVE_API', True)
# Set domain to restrict requests of pithos object contents serve endpoint or
# None for no domain restriction
#PITHOS_SERVE_API_DOMAIN = None
......@@ -60,8 +60,6 @@ PUBLIC_PREFIX = get_path(pithos_services, 'pithos_public.prefix')
UI_PREFIX = get_path(pithos_services, 'pithos_ui.prefix')
VIEW_PREFIX = join_urls(UI_PREFIX, 'view')
COOKIE_NAME = getattr(settings, 'PITHOS_ASTAKOS_COOKIE_NAME', '_pithos2_a')
# --------------------------------------------------------------------
# Process Astakos settings
......
......@@ -43,8 +43,7 @@ from pithos.api.settings import (
BASE_PATH, PITHOS_PREFIX, PUBLIC_PREFIX, VIEW_PREFIX,
ASTAKOS_AUTH_PROXY_PATH, ASTAKOS_AUTH_URL,
ASTAKOS_ACCOUNT_PROXY_PATH, ASTAKOS_ACCOUNT_URL,
ASTAKOS_UI_PROXY_PATH, ASTAKOS_UI_URL, SERVE_API,
pithos_services)
ASTAKOS_UI_PROXY_PATH, ASTAKOS_UI_URL, pithos_services)
urlpatterns = []
......@@ -69,16 +68,15 @@ pithos_view_patterns = patterns(
'object_read'))
pithos_patterns = []
if SERVE_API:
pithos_patterns += patterns(
'',
(r'{0}v1/'.format(prefix_pattern(PITHOS_PREFIX)),
include(pithos_api_patterns)),
(r'{0}.*'.format(prefix_pattern(PITHOS_PREFIX)),
api_endpoint_not_found),
(r'{0}(?P<v_public>.+?)/?$'.format(prefix_pattern(PUBLIC_PREFIX)),
'pithos.api.public.public_demux'),
)
pithos_patterns += patterns(
'',
(r'{0}v1/'.format(prefix_pattern(PITHOS_PREFIX)),
include(pithos_api_patterns)),
(r'{0}.*'.format(prefix_pattern(PITHOS_PREFIX)),
api_endpoint_not_found),
(r'{0}(?P<v_public>.+?)/?$'.format(prefix_pattern(PUBLIC_PREFIX)),
'pithos.api.public.public_demux'),
)
pithos_patterns += patterns(
'',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment