Add a system_information view available through SSL
authorMagnus Hagander <magnus@hagander.net>
Thu, 17 Dec 2015 16:32:52 +0000 (17:32 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 17 Dec 2015 16:34:31 +0000 (17:34 +0100)
pgweb/core/views.py
pgweb/urls.py

index 37288ebd5a96cfc00ec9aca2e4739a34f15c7438..6b400bcde9fd1e183810cb62e53029e37092e0a5 100644 (file)
@@ -230,6 +230,15 @@ def system_information(request):
                        'client_ip': get_client_ip(request),
        })
 
+@ssl_required
+def system_information_ssl(request):
+       return render_to_response('core/system_information.html', {
+                       'server': os.uname()[1],
+                       'behind_cache': False,
+                       'cache_server': None,
+                       'client_ip': get_client_ip(request),
+       })
+
 # Sync timestamp for automirror. Keep it around for 30 seconds
 # Basically just a check that we can access the backend still...
 @cache(seconds=30)
index f9837f5d0760f2256fdf787cc9152886db101229..a4d226a7fe57474894ec8e5e99d44df59e4644a6 100644 (file)
@@ -124,6 +124,7 @@ urlpatterns = patterns('',
 
     # Some basic information about the connection (for debugging purposes)
        (r'^system_information/$', 'pgweb.core.views.system_information'),
+       (r'^system_information_ssl/$', 'pgweb.core.views.system_information_ssl'),
        # Sync timestamp, for automirror
        (r'^web_sync_timestamp$', 'pgweb.core.views.sync_timestamp'),