denoland / dotland

[Archived] deno.land website
https://deno.land
MIT License
957 stars 626 forks source link

Revert "Add `/install.{sh,ps1}` URL aliases" #1978

Closed lucacasonato closed 2 years ago

lucacasonato commented 2 years ago

Reverts denoland/dotland#1969

it isn’t working for me and some other users on discord.

kidonng commented 2 years ago

Sorry for the troublesome PR. I forgot that deno.land runs behind a Cloudflare worker which is more complex than what I thought.

What I expect:

  1. Visit deno.land/install.sh
  2. Vercel returns 308 to deno.land/x/install/install.sh
  3. (same as visiting deno.land/x/install/install.sh directly)

What actually happened:

  1. Visit deno.land/install.sh
  2. Cloudflare worker processes it in handleRequest()
  3. Cloudflare worker processes it in proxyFile() since the URL doesn't match any extra routes
  4. Cloudflare worker requests deno-website2.now.sh with the same pathname
  5. Vercel returns 308 to deno.land/x/install/install.sh
  6. Vercel returns a HTML page since the URL matches the route /x/[...rest]
  7. Cloudflare worker returns the HTML page, which is unexpected