hi, i have an app behind a proxy (caddy) for ssl, i've added the ssl middleware to parse the x-forwarded-proto
header, this works fine, the schema is correctly set to :https
, however, my (response/found "/redirect-target")
results in a location header without the correct schema, i think i'm doing something wrong here, i'll tried to find the code where ring will create a absolute URL from the relative to set breakpoint there, but i didn't found it.
okay, it seems that the request in ring.util.request/request-url
is not the the one that i see in my handler
the :scheme
there is :http
, i added the ring.middleware.ssl/wrap-forwarded-scheme
middleware as soon as i can, i'm used luminus-template for bootstrapping adding the middleware in front of all others in wrap-base
@derveloper You may want to look at the Ring-Default project, which manages common Ring middleware.