File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11(ns ring.middleware.absolute-redirects
2- " Middleware for correcting relative redirects so they adhere to the HTTP RFC."
2+ " Middleware for replacing relative redirects with absolute redirects. Useful
3+ for clients that do not yet implement RFC 7231 (RFC 2616 does not allow
4+ relative redirects)."
35 (:require [ring.util.request :as req])
46 (:import [java.net URL MalformedURLException]))
57
2931(defn wrap-absolute-redirects
3032 " Middleware that converts redirects to relative URLs into redirects to
3133 absolute URLs. While many browsers can handle relative URLs in the Location
32- header, the HTTP RFC states that the Location header must contain an absolute
34+ header, RFC 2616 states that the Location header must contain an absolute
3335 URL."
3436 [handler]
3537 (fn [request]
You can’t perform that action at this time.
0 commit comments