fast-twitch.middlewares.absolute-redirects
Complete generated reference for fast-twitch.middlewares.absolute-redirects
Usage and execution boundary
Rewrites Location for redirect statuses using the request URL. It does not redirect an ordinary 200 response or define routes. Supply correct scheme/host information before this response transform.
(ns application.middleware
(:require [fast-twitch.middlewares.absolute-redirects :as middleware]))
(defn handler [_]
{:status 200 :headers {"content-type" "text/plain"} :body "Hello"})
(def app (middleware/wrap-absolute-redirects handler))
This defines the Ring handler portion. Adapt app through routing/ft-handler or pass it to server/listen!; startup instructions and a complete walkthrough show the surrounding project.
Wrapper order and all middleware families. The function reference below preserves the upstream signatures and source links; helper functions do not all share the wrapper's arity.
Upstream function reference
Rewrites redirect targets so clients receive fully qualified locations when needed.
absolute-redirects-response
(absolute-redirects-response response request)
Function.
Normalizes redirect responses so their Location header is absolute. Source
redirect-statuses
wrap-absolute-redirects
(wrap-absolute-redirects handler)
Function.
Wraps a handler so redirect responses carry absolute Location headers. Source