From 35cc0ea1d6945f38e7fa175a7860976eb38f7622 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 14 Mar 2016 04:15:13 -0400 Subject: [PATCH] Exclude root API and API doc URLs. --- mayan/apps/rest_api/apps.py | 3 +++ mayan/settings/base.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/mayan/apps/rest_api/apps.py b/mayan/apps/rest_api/apps.py index 392537674a..883198886c 100644 --- a/mayan/apps/rest_api/apps.py +++ b/mayan/apps/rest_api/apps.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals +from django.conf import settings from django.utils.translation import ugettext_lazy as _ from common import MayanAppConfig, menu_tools @@ -17,6 +18,8 @@ class RESTAPIApp(MayanAppConfig): def ready(self): super(RESTAPIApp, self).ready() + settings.STRONGHOLD_PUBLIC_URLS += (r'^/%s/.+$' % self.app_url,) + APIEndPoint(app=self, name='rest', version_string='1') Package(label='Django REST framework', license_text=''' diff --git a/mayan/settings/base.py b/mayan/settings/base.py index 84ee1d6115..7845298000 100644 --- a/mayan/settings/base.py +++ b/mayan/settings/base.py @@ -261,3 +261,5 @@ SWAGGER_SETTINGS = { # ------ Timezone -------- TIMEZONE_COOKIE_NAME = 'django_timezone' TIMEZONE_SESSION_KEY = 'django_timezone' +# ----- Stronghold ------- +STRONGHOLD_PUBLIC_URLS = (r'^/docs/.+$',)