diff --git a/swh/web/settings/production.py b/swh/web/settings/production.py --- a/swh/web/settings/production.py +++ b/swh/web/settings/production.py @@ -66,7 +66,3 @@ } WEBPACK_LOADER["DEFAULT"]["CACHE"] = not DEBUG - -LOGIN_URL = "oidc-login" -LOGIN_REDIRECT_URL = "oidc-profile" -LOGOUT_URL = "oidc-logout" diff --git a/swh/web/webapp/urls.py b/swh/web/webapp/urls.py --- a/swh/web/webapp/urls.py +++ b/swh/web/webapp/urls.py @@ -4,6 +4,7 @@ # See top-level LICENSE file for more information import json +import logging from django_js_reverse.views import urls_js import requests @@ -16,6 +17,7 @@ from swh.web.config import get_config from swh.web.utils import archive, origin_visit_types +from swh.web.utils.exc import sentry_capture_exception swh_web_config = get_config() @@ -23,6 +25,8 @@ favicon_view = RedirectView.as_view(url=static(SWH_FAVICON), permanent=True) +logger = logging.getLogger(__name__) + def default_view(request): return render(request, "homepage.html", {"visit_types": origin_visit_types()}) @@ -33,9 +37,12 @@ url = get_config()["history_counters_url"] stat_counters_history = {} - if url: + try: response = requests.get(url, timeout=5) stat_counters_history = json.loads(response.text) + except Exception as exc: + logger.exception(exc) + sentry_capture_exception(exc) counters = { "stat_counters": stat_counters,