Closed dpsutton closed 7 years ago
You can get the current context by looking up the :context
key in the request map.
thanks for the quick response, @weavejester. If i expect a param in this post request, how do i write the params vector ([site]
) to get access to the parameter i was previously sending in as well as the request itself?
[site :as {:keys [context]}]
should do it, I believe. The :context
key is set by Lein-Ring, if you're using that. There's also the :servlet-context-path
key, which is just for the servlet context path, and that's set by Ring when compiling a handler into a servlet.
Our site sits in tomcat along with some others, so it's reached at host/app. An app after a post should redirect back to host/app/. However,
redirects us back to host/ which gives us an nginx error. Is there a way to redirect to a base url?