Revision 14569c60
b/snf-pithos-app/conf/20-snf-pithos-app-settings.conf | ||
---|---|---|
62 | 62 |
# the views with astakos during the resource access token generation procedure |
63 | 63 |
#OA2_CLIENT_CREDENTIALS = getattr(settings, 'PITHOS_OA2_CLIENT_CREDENTIALS', |
64 | 64 |
# (None, None)) |
65 |
# |
|
66 |
# Set to False to serve only views |
|
67 |
#SERVE_API = getattr(settings, 'PITHOS_SERVE_API', True) |
b/snf-pithos-app/pithos/api/settings.py | ||
---|---|---|
183 | 183 |
# The backend block hash algorithm |
184 | 184 |
BACKEND_HASH_ALGORITHM = getattr( |
185 | 185 |
settings, 'PITHOS_BACKEND_HASH_ALGORITHM', 'sha256') |
186 |
|
|
186 | 187 |
# Set the credentials (client_id, client_secret) issued to authenticate |
187 | 188 |
# the views with astakos during the resource access token generation procedure |
188 | 189 |
OA2_CLIENT_CREDENTIALS = getattr(settings, 'PITHOS_OA2_CLIENT_CREDENTIALS', |
189 | 190 |
(None, None)) |
191 |
|
|
192 |
# Set to False to serve only views |
|
193 |
SERVE_API = getattr(settings, 'PITHOS_SERVE_API', True) |
b/snf-pithos-app/pithos/api/urls.py | ||
---|---|---|
43 | 43 |
BASE_PATH, PITHOS_PREFIX, PUBLIC_PREFIX, VIEW_PREFIX, |
44 | 44 |
ASTAKOS_AUTH_PROXY_PATH, ASTAKOS_AUTH_URL, |
45 | 45 |
ASTAKOS_ACCOUNT_PROXY_PATH, ASTAKOS_ACCOUNT_URL, |
46 |
ASTAKOS_UI_PROXY_PATH, ASTAKOS_UI_URL, |
|
46 |
ASTAKOS_UI_PROXY_PATH, ASTAKOS_UI_URL, SERVE_API,
|
|
47 | 47 |
pithos_services) |
48 | 48 |
|
49 | 49 |
|
... | ... | |
68 | 68 |
(r'^(?P<v_account>.+?)/(?P<v_container>.+?)/(?P<v_object>.+?)$', |
69 | 69 |
'object_read')) |
70 | 70 |
|
71 |
pithos_patterns = patterns( |
|
71 |
if SERVE_API: |
|
72 |
pithos_patterns = patterns( |
|
73 |
'', |
|
74 |
(r'{0}v1/'.format(prefix_pattern(PITHOS_PREFIX)), |
|
75 |
include(pithos_api_patterns)), |
|
76 |
(r'{0}.*'.format(prefix_pattern(PITHOS_PREFIX)), |
|
77 |
api_endpoint_not_found), |
|
78 |
(r'{0}(?P<v_public>.+?)/?$'.format(prefix_pattern(PUBLIC_PREFIX)), |
|
79 |
'pithos.api.public.public_demux'), |
|
80 |
) |
|
81 |
|
|
82 |
urlpatterns += patterns( |
|
72 | 83 |
'', |
73 |
(r'{0}v1/'.format(prefix_pattern(PITHOS_PREFIX)), |
|
74 |
include(pithos_api_patterns)), |
|
75 |
(r'{0}.*'.format(prefix_pattern(PITHOS_PREFIX)), |
|
76 |
api_endpoint_not_found), |
|
77 |
(r'{0}(?P<v_public>.+?)/?$'.format(prefix_pattern(PUBLIC_PREFIX)), |
|
78 |
'pithos.api.public.public_demux'), |
|
79 |
(r'{0}'.format(prefix_pattern(UI_PREFIX)), |
|
80 | 84 |
(r'{0}'.format(prefix_pattern(VIEW_PREFIX)), |
81 | 85 |
include(pithos_view_patterns))) |
82 | 86 |
|
Also available in: Unified diff