ganelon.web.middleware documentation

Simple middleware utility functions.


(wrap-cdnify-images handler cdn-home-url)
For a response type of text/html or application/json, alters all src attribute values, which start with / by
prepending cdn-home-url prefix.


(wrap-x-forwarded-for handler)
Replace :remote-addr in request with a value of x-forwarded-for request header.

CAUTION: use only when the Java process' port is accessible from localhost only.