nhsx / standards-registry

The service powering the NHS standards directory
https://data.standards.nhs.uk
MIT License
4 stars 5 forks source link

[STAN-1180] add permanent redirect from 'current-standards' to 'published-standards' #341

Closed roc closed 1 year ago

roc commented 1 year ago

Passes back a 308 on requests to current-standards and any nested path:

❯ curl http://localhost:3000/current-standards -v
*   Trying 127.0.0.1:3000...
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET /current-standards HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.79.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 308 Permanent Redirect
< Location: /published-standards
< Refresh: 0;url=/published-standards
< Date: Tue, 15 Nov 2022 09:52:21 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< Transfer-Encoding: chunked
< 
* Connection #0 to host localhost left intact
/published-standards%                                                                                                                             

and for http://localhost:3000/current-standards/systemic-anti-cancer-therapy-data-set:

❯ curl http://localhost:3000/current-standards/systemic-anti-cancer-therapy-data-set -v
*   Trying 127.0.0.1:3000...
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET /current-standards/systemic-anti-cancer-therapy-data-set HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.79.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 308 Permanent Redirect
< Location: /published-standards/systemic-anti-cancer-therapy-data-set
< Refresh: 0;url=/published-standards/systemic-anti-cancer-therapy-data-set
< Date: Tue, 15 Nov 2022 09:52:08 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< Transfer-Encoding: chunked
< 
* Connection #0 to host localhost left intact
/published-standards/systemic-anti-cancer-therapy-data-set%