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

x/oak_http_proxy/test/deps.ts>Oak.REDIRECT_BACK

Proxy middleware for Deno Oak HTTP servers. 🐿 🦕
Latest
variable Oak.REDIRECT_BACK
import { Oak } from "https://deno.land/x/oak_http_proxy@2.3.0/test/deps.ts";
const { REDIRECT_BACK } = Oak;

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