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

impl: use Netlify redirects instead of HTML #925

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

MarkLodato
Copy link
Member

Switch to Netlify's HTTP-level redirects instead of HTML-level
<meta refresh> redirects. (Historical note: we originally used the
latter because GitHub Pages did not support HTTP-level redirects.)

Advantages:

  • Preserves URL fragments.
    Example: slsa.dev/levels#build-l3 no longer drops the #build-l3.
  • Supports directory redirection path components after the redirect.
    Example: slsa.dev/spec/v1/levels now works.
  • Supports temporary redirects (302). The problem with <meta refresh>
    is that they are always interpreted as permanent, which is a problem
    when we do a version bump (e.g. /levels -> /spec/v1.0/levels).
  • Cleans up our directory tree, which now only contains true content.

Signed-off-by: Mark Lodato lodato@google.com

Switch to Netlify's HTTP-level redirects instead of HTML-level
`<meta refresh>` redirects. (Historical note: we originally used the
latter because GitHub Pages did not support HTTP-level redirects.)

Advantages:

- Preserves URL fragments.
  Example: slsa.dev/levels#build-l3 no longer drops the `#build-l3`.
- Supports directory redirection path components after the redirect.
  Example: slsa.dev/spec/v1/levels now works.
- Supports temporary redirects (302). The problem with `<meta refresh>`
  is that they are always interpreted as permanent, which is a problem
  when we do a version bump (e.g. /levels -> /spec/v1.0/levels).
- Cleans up our directory tree, which now only contains true content.

Signed-off-by: Mark Lodato <lodato@google.com>
@netlify
Copy link

netlify bot commented Jul 20, 2023

Deploy Preview for slsa ready!

Name Link
🔨 Latest commit 2aac3f1
🔍 Latest deploy log https://app.netlify.com/sites/slsa/deploys/64b9686c9a8cab00086e1193
😎 Deploy Preview https://deploy-preview-925--slsa.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

Neat!

@MarkLodato MarkLodato merged commit 46673cf into slsa-framework:main Jul 20, 2023
6 checks passed
@MarkLodato MarkLodato deleted the redirect branch July 20, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants