Screenshot of the Parliament Protect form shown to visitors from UK Parliament. The title of the page is "UK Parliament Protect". Introduction text appears at the top that reads "Due to the Online Safety Act members of UK Parliament must verify their age and identity before accessing this site.  Please fill in the following form in full to request access." with form fields asking for personal information below.
Screenshot of the Parliament Protect message response. It reads "Due to the Online Safety Act, visitors from UK Parliament have been protected from viewing this website.  Have a nice day."
Screenshot of the Parliament Protect configuration form. The top shows statistics for the modules reading "129 requests from UK Parliament have been blocked." The form consists of fields to set IP address ranges, set the title, and choices for the type of protection, either form or message.

This project is not covered by Drupal’s security advisory policy.

Protect your website from UK Parliament!

The wildly unpopular and ill-conceived Online Safety Act is now in full force in the UK. As a result it's important to make sure that visitors from UK Parliament are safe from the content of your site.

Parliament Protect will block all UK Parliament IP address range visitors from accessing any content and redirect them to either a silly, satirical form, or a custom message of your choice. The module will also log any attempts at visits from the configured IP ranges and stores the number of times that happens.

The form contains many, many fields, but the data isn't actually saved when submitted. It's more of an online safety joke than anything else. But since the IP ranges that trigger the redirect are customisable, you can theoretically use this module for something other than blocking UK Parliament.

Just configure the module to show a custom title and message instead of the form. That way you can block any individual IP address or range of addresses and return a themed page instead of just a basic response like the core Ban module.

Demo site

https://pp.deliciouscreative.com

Clicking any internal link on the demo site will redirect you to the protection page. This is done by enabling debugging in the module and illustrates the behaviour when someone visits from a banned IP range or address.

"AI" Policy

No "AI" was used in the creation of this module.

No "AI" contributions are welcome.

Project information

Releases