Show More
@@ -48,6 +48,14 b' def _get_ip_addr(environ):' | |||||
48 | return ip |
|
48 | return ip | |
49 |
|
49 | |||
50 |
|
50 | |||
|
51 | def _get_access_path(environ): | |||
|
52 | path = environ.get('PATH_INFO') | |||
|
53 | org_req = environ.get('pylons.original_request') | |||
|
54 | if org_req: | |||
|
55 | path = org_req.environ.get('PATH_INFO') | |||
|
56 | return path | |||
|
57 | ||||
|
58 | ||||
51 | class BasicAuth(AuthBasicAuthenticator): |
|
59 | class BasicAuth(AuthBasicAuthenticator): | |
52 |
|
60 | |||
53 | def __init__(self, realm, authfunc, auth_http_code=None): |
|
61 | def __init__(self, realm, authfunc, auth_http_code=None): | |
@@ -187,13 +195,13 b' class BaseController(WSGIController):' | |||||
187 | cookie_store.get('is_authenticated') |
|
195 | cookie_store.get('is_authenticated') | |
188 | ) |
|
196 | ) | |
189 | log.info('IP: %s User: %s accessed %s' % ( |
|
197 | log.info('IP: %s User: %s accessed %s' % ( | |
190 |
self.ip_addr, auth_user, safe_unicode(environ |
|
198 | self.ip_addr, auth_user, safe_unicode(_get_access_path(environ))) | |
191 | ) |
|
199 | ) | |
192 | return WSGIController.__call__(self, environ, start_response) |
|
200 | return WSGIController.__call__(self, environ, start_response) | |
193 | finally: |
|
201 | finally: | |
194 | log.info('IP: %s Request to %s time: %.3fs' % ( |
|
202 | log.info('IP: %s Request to %s time: %.3fs' % ( | |
195 | _get_ip_addr(environ), |
|
203 | _get_ip_addr(environ), | |
196 |
safe_unicode(environ |
|
204 | safe_unicode(_get_access_path(environ)), time.time() - start) | |
197 | ) |
|
205 | ) | |
198 | meta.Session.remove() |
|
206 | meta.Session.remove() | |
199 |
|
207 |
@@ -1,14 +1,16 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
2 | <!DOCTYPE html> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 | <head> |
|
4 | <head> | |
5 | <title>Error - ${c.error_message}</title> |
|
5 | <title>Error - ${c.error_message}</title> | |
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
|
7 | <meta name="robots" content="index, nofollow"/> | |||
|
8 | <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> | |||
|
9 | ||||
|
10 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |||
7 | %if c.redirect_time: |
|
11 | %if c.redirect_time: | |
8 | <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/> |
|
12 | <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/> | |
9 | %endif |
|
13 | %endif | |
10 | <link rel="icon" href="${h.url("/images/hgicon.png")}" type="image/png" /> |
|
|||
11 | <meta name="robots" content="index, nofollow"/> |
|
|||
12 |
|
14 | |||
13 | <!-- stylesheets --> |
|
15 | <!-- stylesheets --> | |
14 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" /> |
|
16 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" /> |
General Comments 0
You need to be logged in to leave comments.
Login now