Fork me on GitHub
#ring
<
2017-08-21
>
derveloper00:08:45

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.

derveloper01:08:48

okay, it seems that the request in ring.util.request/request-url is not the the one that i see in my handler

derveloper01:08:17

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

weavejester01:08:46

@derveloper You may want to look at the Ring-Default project, which manages common Ring middleware.