diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-22 11:53:04 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-22 11:53:04 +0800 |
commit | 088325073247e2f7bc85fd3baafdad1ea6a635a5 (patch) | |
tree | 57a8d5b42e9b6b55cc51146edc2848fb174ff440 /templates | |
parent | Fix tree/raw redirection and disallow slashes in their path segments (diff) | |
download | forge-088325073247e2f7bc85fd3baafdad1ea6a635a5.tar.gz forge-088325073247e2f7bc85fd3baafdad1ea6a635a5.tar.zst forge-088325073247e2f7bc85fd3baafdad1ea6a635a5.zip |
Add HTTP 451
Diffstat (limited to 'templates')
-rw-r--r-- | templates/400.tmpl | 2 | ||||
-rw-r--r-- | templates/451.tmpl | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/templates/400.tmpl b/templates/400.tmpl index 1fcd5d9..d141ed5 100644 --- a/templates/400.tmpl +++ b/templates/400.tmpl @@ -13,7 +13,7 @@ {{- template "header" . -}} <div class="padding-wrapper complete-error-page"> <h1>400 Bad Request</h1> - <p>{{- .bad_request_msg -}}</p> + <p>{{- .complete_error_msg -}}</p> <hr /> <address>Lindenii Forge</address> </div> diff --git a/templates/451.tmpl b/templates/451.tmpl new file mode 100644 index 0000000..114fde6 --- /dev/null +++ b/templates/451.tmpl @@ -0,0 +1,25 @@ +{{/* + SPDX-License-Identifier: AGPL-3.0-only + SPDX-FileContributor: Runxi Yu <https://runxiyu.org> +*/}} +{{- define "451" -}} +<!DOCTYPE html> +<html lang="en"> + <head> + {{- template "head_common" . -}} + <title>451 Unavailable For Legal Reasons – {{ .global.forge_title }}</title> + </head> + <body class="451"> + {{- template "header" . -}} + <div class="padding-wrapper complete-error-page"> + <h1>451 Unavailable For Legal Reasons</h1> + <p>{{- .complete_error_msg -}}</p> + <hr /> + <address>Lindenii Forge</address> + </div> + <footer> + {{- template "footer" . -}} + </footer> + </body> +</html> +{{- end -}} |