Skip to content

Commit

Permalink
feat: Add (www.)18f.gov/chat redirect to google form
Browse files Browse the repository at this point in the history
  • Loading branch information
apburnes committed Sep 13, 2024
1 parent 9941549 commit f4acfcc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"eslint": "eslint",
"test": "tape test/unit/**/*.js | tap-summary --no-progress",
"test-prod": "TARGET_HOST=https://pages.18f.gov npm run test-integration",
"test-docker": "docker-compose up -d && sleep 2 && docker-compose run test_client npm run test-integration && docker-compose stop",
"test-docker": "docker compose up -d && sleep 2 && docker compose run test_client npm run test-integration && docker compose stop",
"test-integration": "tape test/integration/**/*.js | tap-summary --no-progress",
"clean": "rm out/*.conf",
"build": "node build.js",
"build-docker": "npm run build && docker-compose build"
"build-docker": "npm run build && docker compose build"
},
"devDependencies": {
"eslint": "^8.49.0",
Expand Down
9 changes: 8 additions & 1 deletion templates/_federalist-redirects.njk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ server {
server_name 18f.gov www.18f.gov;
add_header X-Government-Innovation Disrupted;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
return 302 https://$target_domain$request_uri;

location ~ ^/chat/?$ {
return 302 https://docs.google.com/forms/d/e/1FAIpQLSfFoLTRV00g1iIEZv404wJ0BRwNc6CPKbyXMCeXLjDKDv9g4Q/viewform?usp=sf_link/;
}

location / {
return 302 https://$target_domain$request_uri;
}
}

# api-all-the-x.18f.gov to github.com/18F/API-All-the-X
Expand Down
2 changes: 2 additions & 0 deletions test/integration/test_federalist_redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const expectedRedirects = [
{ from: 'www.pif.gov', to: 'presidentialinnovationfellows.gov' },
{ from: 'apply.pif.gov', to: 'presidentialinnovationfellows.gov/apply', noPath: true },
{ from: '18f.gov', to: '18f.gsa.gov' },
{ from: '18f.gov/chat', to: 'docs.google.com/forms/d/e/1FAIpQLSfFoLTRV00g1iIEZv404wJ0BRwNc6CPKbyXMCeXLjDKDv9g4Q/viewform?usp=sf_link', noPath: true },
{ from: 'www.18f.gov', to: '18f.gsa.gov' },
{ from: 'www.18f.gov/chat', to: 'docs.google.com/forms/d/e/1FAIpQLSfFoLTRV00g1iIEZv404wJ0BRwNc6CPKbyXMCeXLjDKDv9g4Q/viewform?usp=sf_link', noPath: true },
{ from: 'digitalgov.gov', to: 'digital.gov', redirectCode: 301 },
{ from: 'www.digitalgov.gov', to: 'digital.gov', redirectCode: 301 },
{ from: 'www.digital.gov', to: 'digital.gov', redirectCode: 301 },
Expand Down

0 comments on commit f4acfcc

Please sign in to comment.