Skip to content

alphagov-mirror/bouncer

This branch is 650 commits behind alphagov/bouncer:main.

Folders and files

NameName
Last commit message
Last commit date
Dec 8, 2020
Sep 9, 2020
Nov 11, 2016
Jan 7, 2021
May 14, 2019
Jan 7, 2021
Oct 8, 2014
Oct 12, 2020
Mar 18, 2016
Oct 26, 2020
Oct 8, 2020
Oct 22, 2020
Jan 14, 2021
Mar 2, 2018
Jun 12, 2015
Sep 30, 2014
Oct 22, 2020
Oct 22, 2020
Aug 24, 2017
Aug 20, 2013

Repository files navigation

bouncer

This is a Rack-based redirector. It serves 301s and 410s from mappings created by Transition.

Testing in a browser in development

These instructions assume you use the Dev VM, that Bouncer is running, and that you have some data in your Transition/Bouncer database.

Let's say you want to test bis.gov.uk.

Get the IP address of your VM:

mac$ ping transition.dev.gov.uk

Then, add to hosts file on your Mac:

mac$ cat /etc/hosts
10.1.1.254 dev.bis.gov.uk

Then on your VM, as root, add this file:

dev$ cat /etc/nginx/sites-available/bis.gov.uk
server {
  server_name dev.bis.gov.uk;
  listen 80;

  location / {
    proxy_pass http://bouncer.dev.gov.uk-proxy;
    proxy_set_header Host bis.gov.uk;
  }
}

Then link the file:

dev$ sudo ln -s /etc/nginx/sites-available/bis.gov.uk /etc/nginx/sites-enabled/bis.gov.uk

And restart nginx:

dev$ sudo service nginx restart

Now browse to http://dev.bis.gov.uk/410 and bask in the glory.

About

Handles traffic for sites that have transitioned to GOV.UK

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 90.1%
  • CSS 5.8%
  • HTML 3.6%
  • Other 0.5%