Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Redirect straight from http://gov.uk to https://www.gov.uk #340

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spec/test-outputs/tldredirect-integration.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ sub vcl_error {
if (obj.status == 801) {
set obj.status = 301;
set obj.response = "Moved Permanently";
set obj.http.Location = "https://" req.http.host req.url;
set obj.http.Location = "https://www.gov.uk" req.url;
set obj.http.Fastly-Backend-Name = "force_ssl";
# Strict-Transport-Security header is ignored for http:// requests
}

if (obj.status == 802) {
Expand Down
3 changes: 2 additions & 1 deletion spec/test-outputs/tldredirect-production.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ sub vcl_error {
if (obj.status == 801) {
set obj.status = 301;
set obj.response = "Moved Permanently";
set obj.http.Location = "https://" req.http.host req.url;
set obj.http.Location = "https://www.gov.uk" req.url;
set obj.http.Fastly-Backend-Name = "force_ssl";
# Strict-Transport-Security header is ignored for http:// requests
}

if (obj.status == 802) {
Expand Down
3 changes: 2 additions & 1 deletion spec/test-outputs/tldredirect-staging.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ sub vcl_error {
if (obj.status == 801) {
set obj.status = 301;
set obj.response = "Moved Permanently";
set obj.http.Location = "https://" req.http.host req.url;
set obj.http.Location = "https://www.gov.uk" req.url;
set obj.http.Fastly-Backend-Name = "force_ssl";
# Strict-Transport-Security header is ignored for http:// requests
}

if (obj.status == 802) {
Expand Down
3 changes: 2 additions & 1 deletion spec/test-outputs/tldredirect-test.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ sub vcl_error {
if (obj.status == 801) {
set obj.status = 301;
set obj.response = "Moved Permanently";
set obj.http.Location = "https://" req.http.host req.url;
set obj.http.Location = "https://www.gov.uk" req.url;
set obj.http.Fastly-Backend-Name = "force_ssl";
# Strict-Transport-Security header is ignored for http:// requests
}

if (obj.status == 802) {
Expand Down
3 changes: 2 additions & 1 deletion vcl_templates/tldredirect.vcl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ sub vcl_error {
if (obj.status == 801) {
set obj.status = 301;
set obj.response = "Moved Permanently";
set obj.http.Location = "https://" req.http.host req.url;
set obj.http.Location = "https://www.gov.uk" req.url;
set obj.http.Fastly-Backend-Name = "force_ssl";
# Strict-Transport-Security header is ignored for http:// requests
}

if (obj.status == 802) {
Expand Down