Table of contents

Edit an existing route in the Router

This page was imported from the opsmanual on GitHub Enterprise. It hasn’t been reviewed for accuracy yet. View history in old opsmanual

If there’s a need to edit a Route in the database, follow these instructions:

$ ssh router-backend-1.router.production
$ cd /var/apps/router-api
$ sudo -u deploy govuk_setenv router-api bundle exec rails c
> r = Route.where(incoming_path: '/path-to-item').first

manipulate the r object directly (see the documentation for available options), eg:

> r.route_type = 'exact'

once you’ve edited the Route appropriately and saved it, you need to reload the router:

> RouterReloader.reload
This page is owned by #2ndline and needs to be reviewed