templates_people_ssh_keysdir = $(templates_peopledir)/ssh-keys
templates_static_DATA = \
+ src/templates/static/blocked.html \
src/templates/static/chat.html \
src/templates/static/features.html \
src/templates/static/legal.html \
--- /dev/null
+{% extends "../base.html" %}
+
+{% block title %}{{ _("You have been blocked") }}{% end block %}
+
+{% block container %}
+ <div class="container">
+ <div class="row justify-content-center mt-5">
+ <div class="col col-md-5">
+ <h5 class="mb-0">{{ _("Oops") }}</h5>
+ <h1>{{ _("You have been blocked") }}</h1>
+
+ <p>
+ {{ _("Your request has been blocked because your IP address is suspected to spread spam.") }}
+ </p>
+
+ <p>
+ <a href="https://location.ipfire.org/lookup/{{ address }}">
+ {{ _("Click here to find out more about the status of your IP address") }}
+ </a>
+ </p>
+ </div>
+ </div>
+ </div>
+{% end %}
+
+{% block footer %}{% end block %}
# Export arbitrary error pages
(r"/error/([45][0-9]{2})", ErrorHandler),
+
+ # Block page
+ (r"/blocked", BlockedHandler),
])
# blog.ipfire.org
raise tornado.web.HTTPError(400)
raise tornado.web.HTTPError(code)
+
+
+class BlockedHandler(BaseHandler):
+ def get(self):
+ # 403 - Forbidden
+ self.set_status(403)
+
+ self.render("static/blocked.html", address=self.get_remote_ip())