Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/oak_nest/mod.ts>REDIRECT_BACK

Refer to nestjs to realize some common functions for Deno
Go to Latest
variable REDIRECT_BACK
import { REDIRECT_BACK } from "https://deno.land/x/oak_nest@v2.0.0/mod.ts";

A symbol that indicates to response.redirect() to attempt to redirect back to the request referrer. For example:

import { Application, REDIRECT_BACK } from "https://deno.land/x/oak/mod.ts";

const app = new Application();

app.use((ctx) => {
  if (ctx.request.url.pathName === "/back") {
    ctx.response.redirect(REDIRECT_BACK, "/");
  }
});

await app.listen({ port: 80 });

type

symbol