Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/doc 150/remove vercel redirects #1300

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

fmonper1
Copy link
Collaborator

@fmonper1 fmonper1 commented May 15, 2023

Currently we handle redirection in two ways.

  1. The vercel config
  2. Meta refresh pages generated during build time

This PR removes the redirects from the vercel config so that there is a single source of truth for our redirects and also introduces middleware for handling redirections at the edge.

Middlewares allow us to keep track of the page referrer by extracting the referer header from the http request and appending it to the destination url.

Test url: https://documentation-git-chore-doc-150remove-verc-960820-chainlinklabs.vercel.app/docs/chainlink-keepers/introduction

@vercel
Copy link

vercel bot commented May 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 3, 2023 9:34pm

@@ -10,397 +10,5 @@
]
}
],
"cleanUrls": true,
"redirects": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these all duplicates with the Astro redirects? We might need to merge this list into the Astro redirects file and clean up duplicate entries.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and we shouldn't be using vercel redirections at all with astro 2.0 https://vercel.com/docs/frameworks/astro#can-i-use-vercel.json-to-create-rewrites-with-astro

@dwightjl
Copy link
Contributor

dwightjl commented Jul 29, 2023

@fmonper1 Builds are working again after generating a fresh package-lock.json file but the new linkchecker is throwing errors. I'll take a look later and see if I can figure out why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants