0

I have a website deployed on Deno deploy with a custom domain. I thought it would be possible to configure the appropriate redirects directly in the platform like I could do in for example, Vercel.

My question is: How can I configure redirects from https://www.example.com to https://example.com? Do I have to use middleware for this or is there another easier way that I'm missing?

jsejcksn
  • 27,667
  • 4
  • 38
  • 62
hcode
  • 15
  • 3

1 Answers1

0

The only way that I know of currently to do this with Deno Deploy is in your code.

Example from Redirect | Examples | Deno:

function handler(_req: Request) {
  return Response.redirect("https://example.com", 307);
}
mfulton26
  • 29,956
  • 6
  • 64
  • 88