Implement error pages, improve request logging
This commit is contained in:
parent
0cf51b8ff1
commit
e9c34a2337
19 changed files with 462 additions and 167 deletions
|
@ -26,8 +26,15 @@
|
|||
<meta name="theme-color" content="#11568c">
|
||||
<title>{{ .Title }}</title>
|
||||
</head>
|
||||
<body class="text-center idp">
|
||||
{{ template "content" . }}
|
||||
<body class="text-center idp d-flex flex-column h-100">
|
||||
<main role="main" class="flex-shrink-0">
|
||||
{{ template "content" . }}
|
||||
</main>
|
||||
<footer class="footer mt-auto py-3">
|
||||
<div class="container">
|
||||
<span class="text-muted small">© 2020 <a href="https://www.cacert.org/">CAcert</a></span>
|
||||
</div>
|
||||
</footer>
|
||||
<script type="text/javascript" src="/js/cacert.bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
13
templates/idp/errors.gohtml
Normal file
13
templates/idp/errors.gohtml
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ define "content" }}
|
||||
<div class="container">
|
||||
<img src="/images/CAcert-logo.svg" width="300" height="68" alt="CAcert" class="mb-4">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h2>{{ if .details.ErrorCode }}
|
||||
<strong>{{ .details.ErrorCode }}</strong> {{ end }}{{ .details.ErrorMessage }}</h2>
|
||||
{{ if .details.ErrorDetails }}
|
||||
{{ range .details.ErrorDetails }}
|
||||
<p>{{ . }}</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
Reference in a new issue